The rust job cost 21m44s on every PR while only ~1 PR in 40 touches src-tauri/, and the runner has capacity 1 — the frontend job queues behind it, so every PR paid ~24.5 min of feedback. Measured on run 326 (2026-07-21), 12m15s of that was pure waste: - 6m54s tarring target/ and the cargo registry for saves that time out against the runner's unreachable cache server (#234). The restore times out into a miss too, so nothing was ever cached at either end. - 4m41s recompiling cargo-audit from source on every run. - ~40s on the two doomed restores. Split check.yml into check-rust.yml (paths: src-tauri/**) and check-frontend.yml (paths-ignore denylist), drop every actions/cache step until #234 is fixed, and install cargo-audit as a prebuilt binary via taiki-e/install-action. The audit step keeps continue-on-error — advisories are informational and can land on unrelated crates — but loses the `|| true` that also hid tooling failures; the install step is blocking. The frontend filter is a denylist on purpose: that job costs ~2.5 min, so running it needlessly is cheap while silently not running it is not. The expensive job keeps a strict allowlist. Neither workflow filters on `branches:` anymore. `branches: [main]` never matched a PR stacked on another feature branch, which is what /autopilot produces: PRs #305-#308 of the feature-gating milestone ran no CI at all. Adds audit.yml for daily RustSec coverage, since check-rust.yml now only runs on Rust PRs. It skips the Rust toolchain entirely — cargo-audit only reads Cargo.lock — so it costs ~1-2 min rather than the ~22 a scheduled check-rust would burn daily on a capacity-1 runner. The GitHub mirror is left untouched (#233: it receives no PRs). Expected: Rust PR ~9-10 min, frontend-only PR ~2.5 min instead of ~24.5. Resolves #232
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: PR Check — Frontend
|
|
|
|
# Frontend half of the former check.yml (split in #232).
|
|
#
|
|
# Filtered with paths-ignore rather than an allowlist: this job costs ~2.5 min,
|
|
# so running it when it was not strictly needed is cheap, while silently NOT
|
|
# running it is not. A root-level config file added later would drop out of an
|
|
# allowlist without anyone noticing; here it fails safe.
|
|
#
|
|
# No `branches:` filter — see check-rust.yml.
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'src-tauri/**'
|
|
- 'docs/**'
|
|
- 'reports/**'
|
|
- 'tasks/**'
|
|
- '.github/**'
|
|
- '.forgejo/workflows/check-rust.yml'
|
|
- '.forgejo/workflows/audit.yml'
|
|
- '.forgejo/workflows/release.yml'
|
|
- '*.md'
|
|
- 'LICENSE'
|
|
|
|
# Distinct group from the rust workflow — see check-rust.yml.
|
|
concurrency:
|
|
group: ci-frontend-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
frontend:
|
|
runs-on: ubuntu
|
|
container: ubuntu:22.04
|
|
steps:
|
|
- name: Install Node.js 20
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends curl ca-certificates git
|
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
|
apt-get install -y nodejs
|
|
node --version
|
|
npm --version
|
|
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
# No npm cache step here, deliberately — same reason as the cargo caches
|
|
# in check-rust.yml: the restore misses and the save times out against
|
|
# the runner's cache server (#234), which cost ~23s per run for nothing.
|
|
# Restore it together with rust-cache once #234 is fixed.
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build (tsc + vite)
|
|
run: npm run build
|
|
|
|
- name: Tests (vitest)
|
|
run: npm test
|