| name: Tracker CI |
|
|
| on: |
| workflow_dispatch: |
| pull_request: |
| paths: |
| - "tracker/**" |
|
|
| concurrency: |
| group: ${{ github.workflow }}-${{ github.ref }} |
| cancel-in-progress: true |
|
|
| jobs: |
| test: |
| timeout-minutes: 15 |
| runs-on: blacksmith-4vcpu-ubuntu-2404 |
| strategy: |
| fail-fast: false |
| matrix: |
| shardIndex: [1, 2, 3, 4] |
| shardTotal: [4] |
| steps: |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f |
| with: |
| node-version: 23.2.0 |
| cache: 'npm' |
| cache-dependency-path: tracker/package-lock.json |
| - name: Install dependencies |
| run: npm --prefix ./tracker ci |
| - name: Cache Playwright browsers |
| uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 |
| id: playwright-cache |
| with: |
| path: | |
| ~/.cache/ms-playwright |
| ~/.cache/ms-playwright-github |
| key: playwright-${{ runner.os }}-${{ hashFiles('tracker/package-lock.json') }} |
| restore-keys: | |
| playwright-${{ runner.os }}- |
| - name: Install Playwright system dependencies |
| working-directory: ./tracker |
| run: npx playwright install-deps |
| - name: Install Playwright Browsers |
| if: steps.playwright-cache.outputs.cache-hit != 'true' |
| working-directory: ./tracker |
| run: npx playwright install |
| - name: Run Playwright tests |
| run: npm --prefix ./tracker test -- --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --reporter=blob |
| - name: Upload blob report to GitHub Actions Artifacts |
| if: ${{ !cancelled() }} |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f |
| with: |
| name: blob-report-${{ matrix.shardIndex }} |
| path: tracker/blob-report |
| retention-days: 1 |
| merge-sharded-test-report: |
| if: ${{ !cancelled() }} |
| needs: [test] |
| timeout-minutes: 5 |
| runs-on: blacksmith-4vcpu-ubuntu-2404 |
| steps: |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f |
| with: |
| node-version: 23.2.0 |
| cache: 'npm' |
| cache-dependency-path: tracker/package-lock.json |
| - name: Install dependencies |
| run: npm --prefix ./tracker ci |
|
|
| - name: Download blob reports from GitHub Actions Artifacts |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c |
| with: |
| path: all-blob-reports |
| pattern: blob-report-* |
| merge-multiple: true |
|
|
| - name: Merge into list report |
| working-directory: ./tracker |
| run: npx playwright merge-reports --reporter list ../all-blob-reports |
|
|