Skip to content

chore(deps): update dependency vitepress to v1.1.3 (#1808) #1146

chore(deps): update dependency vitepress to v1.1.3 (#1808)

chore(deps): update dependency vitepress to v1.1.3 (#1808) #1146

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
env:
CI: true
NODE_OPTIONS: --max-old-space-size=6144
jobs:
lint:
name: Lint
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Lint codes
run: pnpm lint
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Build codes
run: |
pnpm build --all -t
node -r esbuild-register scripts/postprocess.ts
- name: Cache dist
uses: actions/cache@v4
with:
path: packages/*/dist
key: build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
test-unit:
name: Unit test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18.19, 20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run unit tests
run: |
pnpm test:cover
test-type:
name: Type checking
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Run type checking
run: pnpm test:type
test-e2e:
name: E2E test
needs:
- build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18.19, 20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
# Install playwright's binary under custom directory to cache
- name: Set Playwright path
if: runner.os != 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
- name: Set Playwright path (windows)
if: runner.os == 'Windows'
run: echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
- name: Cache Playwright's binary
uses: actions/cache@v4
with:
# Playwright removes unused browsers automatically
# So does not need to add playwright version to key
key: ${{ runner.os }}-playwright-bin-v1
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
- name: Install Playwright
# does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
run: pnpm playwright install chromium
- name: Restore dist cache
uses: actions/cache@v4
with:
path: packages/*/dist
key: build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
- name: Run e2e tests
run: pnpm test:e2e
edge-release:
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!contains(github.event.head_commit.message, 'chore') &&
!contains(github.event.head_commit.message, 'docs')
needs:
- lint
- build
- test-unit
- test-type
- test-e2e
strategy:
matrix:
os: [ubuntu-latest]
node: [18]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: Restore dist cache
uses: actions/cache@v4
with:
path: packages/*/dist
key: build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
- name: Upload message-compiler dist files (debug)
uses: actions/upload-artifact@v4
with:
name: message-compiler
path: packages/message-compiler/dist
- name: Release edge version
run: ./scripts/release-edge.sh
env:
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}