Skip to content

docs: not use deprecated api #1604

docs: not use deprecated api

docs: not use deprecated api #1604

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
npx tsx ./scripts/postprocess.ts
- name: Cache dist
uses: actions/cache@v4
with:
path: packages/*/dist
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
test-unit:
name: Unit test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18.19, 20, 22]
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-e2e:
name: E2E test
needs:
- build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18.19, 20, 22]
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: Install Playwright
run: pnpm playwright-core install chromium
- name: Restore dist cache
uses: actions/cache@v4
with:
path: packages/*/dist
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
- name: Run e2e tests
run: pnpm test:e2e