Show groups in filing suggestions (#211) #564
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 | |
| on: | |
| pull_request: | |
| branches: [master] | |
| # Also run on pushes to master so the release workflow can require a | |
| # green CI commit before publishing (see release.yml gating). | |
| push: | |
| branches: [master] | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - name: Biome (lint, format, organize imports) | |
| run: npx biome ci | |
| typecheck: | |
| name: Typecheck (web) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| # svelte-check loads svelte.config.js, which pulls in Vite/rollup — | |
| # same optional-deps workaround as the build job. | |
| - run: npm install @rollup/rollup-linux-x64-gnu --no-save | |
| - run: npm run build --workspace=@inbox-rs/rs-module | |
| # svelte-check needs the generated plugin-downloads module that the web | |
| # app imports; it's produced by the dev/build hooks, not by `npm ci`. | |
| # Generate it directly (lightweight — reads package.json versions only). | |
| - name: Generate plugin metadata | |
| run: node scripts/gen-plugin-metadata.mjs | |
| - name: svelte-check (app code) | |
| run: npm run check --workspace=@inbox-rs/web | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm install @rollup/rollup-linux-x64-gnu --no-save | |
| - name: Restore transcription asset cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/web/public/ml | |
| key: ${{ runner.os }}-transcription-assets-${{ hashFiles('scripts/vendor-transcription-assets.mjs', 'package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-transcription-assets- | |
| - run: npm run build | |
| - name: Precache budget guard | |
| run: npm run check:precache --workspace=@inbox-rs/web | |
| # Stash the built web app so the e2e job doesn't pay for a second | |
| # cold build — Vite + plugin packaging is the slow step here. | |
| - name: Upload web dist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: web-dist | |
| path: packages/web/dist | |
| retention-days: 1 | |
| if-no-files-found: error | |
| unit-tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| - run: npm install @rollup/rollup-linux-x64-gnu --no-save | |
| - name: Restore transcription asset cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: packages/web/public/ml | |
| key: ${{ runner.os }}-transcription-assets-${{ hashFiles('scripts/vendor-transcription-assets.mjs', 'package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-transcription-assets- | |
| # Other workspaces resolve @inbox-rs/rs-module via its `main: | |
| # dist/index.js`, so the dist must exist before vitest can import it. | |
| # Build only rs-module (not the full web app) to keep this job fast | |
| # and parallel with the build job. | |
| - name: Build rs-module | |
| run: npm run build --workspace=packages/rs-module | |
| - run: npm test | |
| e2e: | |
| name: End-to-end (PWA) | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - run: npm ci | |
| # Same npm-optional-deps workaround as the build job: rollup's | |
| # native binary isn't installed by `npm ci` on Linux due to | |
| # https://github.com/npm/cli/issues/4828, and `vite preview` | |
| # loads rollup at runtime to serve the prebuilt dist. | |
| - run: npm install @rollup/rollup-linux-x64-gnu --no-save | |
| # Pull the prebuilt dist from the build job — `vite preview` will | |
| # serve straight out of it. | |
| - name: Download web dist | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: web-dist | |
| path: packages/web/dist | |
| - name: Install Playwright browser | |
| run: npm run test:e2e:install | |
| # Pre-pull the Armadietto image so Playwright's webServer wait | |
| # doesn't double-count the container build. | |
| - name: Build Armadietto image | |
| run: docker compose build armadietto | |
| - name: Run end-to-end tests | |
| run: npm run test:e2e | |
| - name: Upload failure artefacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-artifacts | |
| path: | | |
| tests/e2e/playwright-report | |
| tests/e2e/test-results | |
| retention-days: 7 | |
| if-no-files-found: ignore |