chore(deps): update dependency rollup to v4 - autoclosed #1274
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-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, 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 | |
# 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-os-${{ matrix.os }}-${{ github.sha }} | |
- name: Run e2e tests | |
run: pnpm test:e2e | |
nightly-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-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 nightly version | |
run: ./scripts/release-nightly.sh | |
env: | |
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}} |