Repository navigation
Merge pull request #288 from Programcode/t3/add-six-vs-comparison-pages #1092
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: Quality | |
| # The pull-request check: two jobs side by side, about 2.5 minutes. `check` | |
| # proves the app builds and the repo rules hold; `browser-smoke` proves the | |
| # built pages load in a browser. There is no unit-test job: behavior is proven | |
| # end to end, and the slow, paid and full-stack suites run weekly or on demand | |
| # (docs/operations.md lists them). | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # One job, so a run pays for one runner start and one cache restore. Every | |
| # step is a few seconds to half a minute; the guards are the Vitest files | |
| # listed in vitest.config.ts, about 2 seconds. | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-deps | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| deno-version: 2.9.6 | |
| cache: true | |
| - name: Documentation | |
| run: npm run docs:check | |
| - name: Lint | |
| run: npm run lint | |
| - name: Typecheck | |
| run: npm run typecheck | |
| - name: Guards | |
| run: npm test | |
| # Edge Functions hold auth, quota and billing, which no pull-request | |
| # browser test reaches. | |
| - name: Edge function tests | |
| run: npm run test:edge | |
| - name: Build | |
| run: npm run build | |
| # The @smoke set: the app boots, sign-in works, every public and signed-in | |
| # page renders without errors, and the first-run tour starts a debate. The | |
| # full desktop and mobile suite runs weekly in browser-weekly.yml. | |
| browser-smoke: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/node-deps | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Browser smoke tests | |
| env: | |
| CI: 1 | |
| PORT: 18080 | |
| PLAYWRIGHT_BASE_URL: http://127.0.0.1:18080 | |
| run: npm run test:e2e:smoke | |
| - name: Upload browser failure artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: chromium-smoke-failure-${{ github.run_id }} | |
| path: | | |
| test-results/ | |
| playwright-report/ | |
| if-no-files-found: ignore | |
| retention-days: 7 |