ci: bump ci.yml action pin, allow bot PR reviews, fix release-prepare #32
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] | |
| paths: | |
| - 'dashboard/**' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'vitest.config.mts' | |
| - 'wrangler.json' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.github/workflows/ci.yml' | |
| pull_request: | |
| paths: | |
| - 'dashboard/**' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'vitest.config.mts' | |
| - 'wrangler.json' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.github/workflows/ci.yml' | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-e2e: | |
| name: Playwright Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # mint OIDC token for Worker ingest | |
| checks: write # post PR Check Run | |
| defaults: | |
| run: | |
| working-directory: dashboard | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: dashboard/package-lock.json | |
| - name: Install dashboard dependencies | |
| run: npm ci | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('dashboard/package-lock.json') }} | |
| - name: Install Playwright browsers and OS dependencies | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: npx playwright install --with-deps chromium | |
| - name: Install Playwright OS dependencies only | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: npx playwright install-deps chromium | |
| - name: Run Playwright tests with coverage | |
| run: npm run test:e2e:coverage | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: dashboard/playwright-report/ | |
| retention-days: 30 | |
| - name: Report coverage | |
| uses: CoverageTracker/coverage-tracker/.github/actions/report@v0.4.0 | |
| with: | |
| worker-url: https://demo.coveragetracker.dev | |
| coverage-path: dashboard/coverage/lcov.info | |
| category: frontend | |
| backend-coverage: | |
| name: Worker Coverage | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # mint OIDC token for Worker ingest | |
| checks: write # post PR Check Run | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| # vitest.config.mts loads wrangler.json, whose assets.directory points at | |
| # dashboard/build (gitignored, absent on a fresh checkout). The Workers pool | |
| # tolerates a missing dir for these API-only tests, but create it as a cheap | |
| # guard against runtime/OS differences — no dashboard build needed. | |
| - name: Ensure assets directory exists | |
| run: mkdir -p dashboard/build | |
| - name: Run Worker tests with coverage | |
| run: npm run test:coverage | |
| - name: Report coverage | |
| uses: CoverageTracker/coverage-tracker/.github/actions/report@v0.4.0 | |
| with: | |
| worker-url: https://demo.coveragetracker.dev | |
| category: backend |