fix(router): keep the collection through the default-view redirect (W… #510
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: Frontend CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'frontend/**' | |
| - '.nvmrc' | |
| - '.github/workflows/frontend.yml' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'frontend/**' | |
| - '.nvmrc' | |
| - '.github/workflows/frontend.yml' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Verify npm package signatures | |
| # --min-release-age=0 overrides the cooldown set in frontend/.npmrc. | |
| # Signature verification is about cryptographic integrity, not version | |
| # freshness — without the override npm refuses to resolve any package | |
| # in the lockfile that was published more recently than the cooldown | |
| # window (the lockfile itself is what we want to verify). | |
| run: npm audit signatures --min-release-age=0 | |
| - name: Run Biome check | |
| run: npm run check | |
| - name: Run Svelte typecheck | |
| run: npm run typecheck | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: [lint] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Upload bundle analysis | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: bundle-stats | |
| path: frontend/dist/bundle-analyzer.html | |
| retention-days: 7 | |
| if-no-files-found: ignore | |
| bundle-size: | |
| name: Bundle Size | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Report bundle size | |
| uses: preactjs/compressed-size-action@49c7ff02f46adc39a83c24e91f6110ba8138a19d # v3 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| pattern: "frontend/dist/**/*.{js,css,html}" | |
| build-script: "build" | |
| cwd: "./frontend" |