Feat: Allow the ROI StartEndThreshold tools to choose their measurement target #3568
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: Playwright Tests | |
| on: | |
| pull_request: | |
| branches: [main, master, beta] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| playwright-tests: | |
| timeout-minutes: 120 | |
| runs-on: [nashua] | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 3 | |
| matrix: | |
| include: | |
| - node-version: 24.15.0 | |
| mode: legacy | |
| run_args: '--project=chromium' | |
| collect_coverage: true | |
| - node-version: 24.15.0 | |
| mode: compatibility | |
| run_args: '--compat --project=chromium' | |
| collect_coverage: false | |
| - node-version: 24.15.0 | |
| mode: next | |
| run_args: '--next --project=chromium' | |
| collect_coverage: false | |
| name: Playwright (${{ matrix.mode }}) | |
| steps: | |
| - uses: actions/checkout@v6.0.3 | |
| - uses: actions/setup-node@v6.4.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # No `cache: pnpm`: setup-node resolves the store path by running | |
| # pnpm, which does not exist until the Corepack step below. | |
| # pnpm comes from Corepack, not pnpm/action-setup: that action's | |
| # self-installer requires a working `npm`, which this runner does not | |
| # provide. Corepack ships inside Node and reads the pinned | |
| # `packageManager` from package.json, so it needs no npm. Must run AFTER | |
| # setup-node, so it is that Node's Corepack. Scoped to `pnpm` — unscoped | |
| # `corepack enable` would also create yarn/yarnpkg shims that nothing here | |
| # uses. NOTE: node 25 unbundles corepack; revisit before any such bump. | |
| - name: Enable Corepack (pnpm) | |
| shell: bash | |
| run: | | |
| corepack enable pnpm | |
| corepack prepare --activate | |
| pnpm --version | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright browsers | |
| run: pnpm exec playwright install chromium | |
| - name: Run Playwright tests | |
| env: | |
| CI: true | |
| COVERAGE: ${{ matrix.collect_coverage && 'true' || '' }} | |
| PLAYWRIGHT_HTML_OPEN: never | |
| run: | | |
| export NODE_OPTIONS="--max_old_space_size=10192" | |
| if [ "${{ matrix.collect_coverage }}" = "true" ]; then | |
| bash scripts/ci/with-nashua-lock.sh pnpm exec nyc --reporter=html ./scripts/run-playright.sh ${{ matrix.run_args }} | |
| else | |
| bash scripts/ci/with-nashua-lock.sh ./scripts/run-playright.sh ${{ matrix.run_args }} | |
| fi | |
| - name: Upload Playwright report and test results | |
| if: failure() | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: playwright-results-${{ github.sha }} | |
| if-no-files-found: warn | |
| path: | | |
| tests/playwright-report/ | |
| tests/test-results/ | |
| retention-days: 7 | |
| - name: create the coverage report | |
| if: ${{ matrix.collect_coverage }} | |
| run: | | |
| pnpm exec nyc report --reporter=lcov --reporter=text | |
| - name: Upload the coverage report to GitHub Actions Artifacts | |
| if: ${{ !cancelled() && matrix.collect_coverage }} | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: coverage-report-pr | |
| path: coverage | |
| retention-days: 7 | |
| - name: Upload Playwright reports | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: playwright-report-${{ matrix.mode }} | |
| path: reports/*playwright | |
| retention-days: 7 |