Repository navigation
fix(perf): CWV quick wins - charset, font-display swap, defer GTM, landmark main #49
Workflow file for this run
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.run_attempt == '1' && github.event.pull_request.number && format('pr-{0}', github.event.pull_request.number) || format('run-{0}', github.run_id) }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' && github.run_attempt == '1' }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint-typecheck-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| - name: Install pinned npm | |
| run: npm install --global "$(node -p "require('./package.json').packageManager")" | |
| - run: npm ci | |
| # Dev deps are excluded only because of GHSA-fc5q-39xc-vjpf (picomatch <= 4.0.7 ReDoS, | |
| # no patched release yet), which is reachable only through dev lint tooling | |
| # (typescript-eslint -> tinyglobby). Restore the full audit once picomatch ships a fix. | |
| - run: npm audit --audit-level=high --omit=dev | |
| - name: Install secret scanner | |
| run: go install github.com/zricethezav/gitleaks/v8@v8.30.1 | |
| - name: Scan reachable history | |
| run: '"$(go env GOPATH)/bin/gitleaks" git . --log-opts=--all --redact=100 --no-banner' | |
| - run: npm run corpus:check | |
| - run: npm run lint | |
| - run: npm run typecheck | |
| - run: npm test | |
| - run: npm run website:build | |
| - name: Generate CycloneDX SBOM | |
| run: npm sbom --sbom-format cyclonedx > browser-benchmark.cdx.json | |
| - name: Upload SBOM | |
| uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 | |
| with: | |
| name: browser-benchmark-sbom | |
| path: browser-benchmark.cdx.json | |
| if-no-files-found: error |