chore: tweak #2140
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: check | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
- name: Linter Test | |
run: pnpm lint | |
- name: Docs Test | |
run: | | |
pnpm --filter @vuepress/ecosystem-docs docs:build | |
pnpm --filter @vuepress/ecosystem-docs docs:build-webpack | |
- name: Unit Test | |
run: pnpm test:unit | |
bundle-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js 22 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm bundle | |
- name: Linter Test | |
run: pnpm lint | |
- name: Docs Test | |
run: | | |
pnpm --filter @vuepress/ecosystem-docs docs:build | |
pnpm --filter @vuepress/ecosystem-docs docs:build-webpack | |
- name: Unit Test | |
run: pnpm test:unit | |
check-result: | |
if: ${{ always() }} | |
name: check result | |
runs-on: ubuntu-latest | |
needs: | |
- build-check | |
- bundle-check | |
steps: | |
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} | |
run: exit 1 |