mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-30 02:32:09 +08:00
The paths-filter output in lint-clippy.yml only gated two echo steps; checkout, toolchain setup and clippy itself ran unconditionally, so frontend-only PRs still burned a 3-runner matrix on a full clippy build plus the logging-check tool install. - lint-clippy/rustfmt/frontend-check: move path filters to workflow level so irrelevant PRs spawn no runner at all - split contract-parity into its own workflow; its trigger set spans both sides and workflow paths cannot vary per job - clippy paths now cover crates/** and workspace Cargo files, which the old src-tauri/** filter missed dev has no required status checks, so path-filtered workflows cannot get stuck in "Expected".
69 lines
1.4 KiB
YAML
69 lines
1.4 KiB
YAML
name: Frontend Check
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "src/**"
|
|
- "**/*.js"
|
|
- "**/*.ts"
|
|
- "**/*.tsx"
|
|
- "**/*.css"
|
|
- "**/*.scss"
|
|
- "**/*.json"
|
|
- "**/*.md"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- "vite.config.*"
|
|
- ".github/workflows/frontend-check.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
HUSKY: 0
|
|
|
|
jobs:
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v6
|
|
with:
|
|
run_install: false
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '24.22.1'
|
|
cache: 'pnpm'
|
|
|
|
- name: Restore pnpm cache
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: "pnpm-shared-stable-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}"
|
|
restore-keys: |
|
|
pnpm-shared-stable-${{ runner.os }}-
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run Prettier check
|
|
run: pnpm format:check
|
|
|
|
- name: Run ESLint
|
|
run: pnpm lint
|
|
|
|
- name: Run TypeScript typecheck
|
|
run: pnpm typecheck
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|
|
|
|
- name: Run Knip
|
|
run: pnpm knip:check
|
|
|
|
- name: Architecture gates (listen/emit only in the event bus, invoke only in services)
|
|
run: node scripts/check-architecture.mjs listen emit invoke
|