name: E2E tests on: pull_request: push: branches: - chore/all-my-stuffs concurrency: # A new push supersedes the previous run on the same ref, so a burst of pushes # costs one run instead of one per push. group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: # Built once and shared: the build output is the same for every browser, so # each test job downloads it instead of spending a minute rebuilding it. build: runs-on: ubuntu-26.04-arm steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup pnpm and install dependencies uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0 with: cache: true - name: Build app run: pnpm build - name: Upload build output uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: dist path: dist if-no-files-found: error retention-days: 1 test: needs: build name: test (${{ matrix.browser }}) timeout-minutes: 120 runs-on: ubuntu-26.04-arm strategy: # Always report every browser, rather than cancelling the rest on the # first failure. fail-fast: false matrix: browser: [chromium, firefox, webkit] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Setup pnpm and install dependencies uses: pnpm/setup@fbda4c85fc2e1e08721cd8763afea8f48d60f024 # v3.0.0 with: cache: true - name: Get Playwright version id: playwright-version # The installed version, not the range in package.json: a lockfile bump # inside the same range would otherwise leave the key unchanged and the # cached browsers out of sync with Playwright. run: echo "PLAYWRIGHT_VERSION=$(jq -r .version node_modules/@playwright/test/package.json)" >> "$GITHUB_OUTPUT" - name: Download build output uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: dist path: dist - name: Restore Playwright browsers from cache uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-${{ runner.arch }}-playwright-${{ matrix.browser }}-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}-${{ hashFiles('**/playwright.config.ts') }} restore-keys: | ${{ runner.os }}-${{ runner.arch }}-playwright-${{ matrix.browser }}-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}- ${{ runner.os }}-${{ runner.arch }}-playwright-${{ matrix.browser }}- - name: Install Playwright Browsers run: pnpm exec playwright install --with-deps ${{ matrix.browser }} - name: Run Playwright tests run: pnpm run test:e2e --project=${{ matrix.browser }}