Merge pull request #59 from BotCoder254/dependabot/npm_and_yarn/npm_a… #41
This file contains hidden or 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 | |
| # Compile + test gate for the React/TypeScript frontend. The Rust crates and | |
| # the GHCR runner-image publish were deliberately removed from CI — Rust is | |
| # verified locally (cargo check / clippy -D warnings / cargo test per crate) | |
| # and the runner image is published manually per | |
| # docs/fix-empty-workspace-stale-runner.md. | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| workflow_dispatch: | |
| # One in-flight run per ref: a new push cancels the previous run's jobs. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| # --- Frontend: React + TypeScript (create-react-app) ---------------------- | |
| frontend: | |
| name: frontend (typecheck · test · build) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| # --legacy-peer-deps mirrors the Vercel/Netlify install and sidesteps the | |
| # React 19 peer-dependency conflicts across the UI stack. | |
| - name: Install dependencies | |
| run: npm install --legacy-peer-deps | |
| - name: Type-check (tsc --noEmit) | |
| run: npx tsc --noEmit | |
| - name: Test | |
| run: npx react-scripts test --watchAll=false --passWithNoTests | |
| env: | |
| CI: true | |
| # CI=false so create-react-app does not promote lint warnings to build | |
| # errors — matches the production build on Vercel/Netlify. | |
| - name: Build | |
| run: npm run build | |
| env: | |
| CI: false |