pages: update speedtest #92
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: test-flows | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'README.md' | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| playwright-run: | |
| runs-on: ubuntu-22.04-8vcpu-32gb-300gbssd | |
| # Make sure this matches the version in package.json to get the cache right and APIs matched | |
| container: mcr.microsoft.com/playwright:v1.54.2-jammy | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'yarn' | |
| cache-dependency-path: 'yarn.lock' | |
| - name: Mark workspace as safe for git | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| # Use exact lock file to ensure reproducible install and cached node_modules | |
| # since we're hashing on yarn.lock anyways | |
| - run: yarn install --frozen-lockfile --prefer-offline | |
| # Useful diagnostic | |
| - name: Playwright Info | |
| run: npx playwright --version | |
| - name: Run Playwright tests | |
| run: yarn test-flows --reporter=github,list,html --workers=6 | |
| # Always upload the HTML report (handy to debug failures) | |
| - name: Upload Playwright HTML report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: playwright-report | |
| retention-days: 7 | |
| if-no-files-found: warn | |
| # Optionally upload traces from failed tests | |
| - name: Upload Playwright traces | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-traces | |
| path: test-results | |
| retention-days: 7 | |
| if-no-files-found: warn | |
| # Ensure you have trace: 'on-first-retry' (or similar) in playwright.config.ts | |
| env: | |
| # Keep your app env similar to Cypress job (adjust as needed for tests/MSW) | |
| GITHUB_BASE_URL: https://git.bldrs.dev.pw/p/gh | |
| GITHUB_BASE_URL_UNAUTHENTICATED: https://api.github.com.pw | |
| MSW_IS_ENABLED: true | |
| # These purposely don't have bogus TLDs, as PW specs needs these to pass thru | |
| # MSW so they can be intercepted and served from the mocks instead. | |
| RAW_GIT_PROXY_URL_NEW: https://rawgit.bldrs.dev/model | |
| RAW_GIT_PROXY_URL: https://rawgit.bldrs.dev/r |