Repository navigation
CI: 3-minute pull-request check, slow suites on schedules #1046
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. Five jobs run side by side so the check takes as long | |
| # as the slowest one, about 2.5 minutes. Slow, paid, and full-stack suites run | |
| # on a schedule instead; 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: | |
| lint: | |
| 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: Documentation | |
| run: npm run docs:check | |
| - name: Lint | |
| run: npm run lint | |
| typecheck-build: | |
| 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: Typecheck | |
| run: npm run typecheck | |
| - name: Build | |
| run: npm run build | |
| unit: | |
| 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: Test | |
| run: npm test | |
| - name: Collaboration service tests | |
| run: npm run test:collaboration | |
| # Edge Function tests import only jsr:, npm: and https: modules, so this job | |
| # needs Deno and no npm install. | |
| edge: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Deno | |
| uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5 | |
| with: | |
| deno-version: 2.9.6 | |
| cache: true | |
| - name: Edge function tests | |
| run: npm run test:edge | |
| # 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 in browser-nightly.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 |