Skip to content

refactor(frontend): colocate owner-scoped CSS (#943) #1620

refactor(frontend): colocate owner-scoped CSS (#943)

refactor(frontend): colocate owner-scoped CSS (#943) #1620

Workflow file for this run

name: Frontend CI
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
# main 上每个 commit 单独成组,理由同 backend.yml:main 的 push 共用一个 ref,
# 连续合并会让先合的 run 被后合的取消,红叉掩盖掉真实结论。
concurrency:
group: frontend-ci-${{ github.event.pull_request.number || github.ref }}${{ github.ref == 'refs/heads/main' && format('-{0}', github.sha) || '' }}
cancel-in-progress: true
jobs:
frontend-checks:
name: Frontend checks
runs-on: ubuntu-latest
timeout-minutes: 15
env:
CI: 'true'
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Test with coverage
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./frontend/coverage/lcov.info
flags: frontend
fail_ci_if_error: true
- name: Build
run: npm run build