Support Rhode Island #346
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 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| [ | |
| "src/**/*.ts", | |
| "src/**/*.spec.ts", | |
| "src/**/*.astro", | |
| "astro.config.ts", | |
| "playwright.config.ts", | |
| "package.json", | |
| "pnpm-lock.yaml", | |
| ] | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| [ | |
| "src/**/*.ts", | |
| "src/**/*.spec.ts", | |
| "src/**/*.astro", | |
| "astro.config.ts", | |
| "playwright.config.ts", | |
| "package.json", | |
| "pnpm-lock.yaml", | |
| ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: End-to-End (${{ matrix.browser }}) | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [chromium, firefox, webkit] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v6.0.8 | |
| - name: Setup Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24.x" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Resolve Playwright version | |
| shell: bash | |
| run: | | |
| VERSION=$(node -e "console.log(require('@playwright/test/package.json').version)") | |
| echo "PLAYWRIGHT_VERSION=$VERSION" >> "$GITHUB_ENV" | |
| - name: Cache Playwright browser binaries | |
| uses: actions/cache@v5 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-${{ matrix.browser }} | |
| - name: Install Playwright browsers and OS dependencies | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: pnpm exec playwright install --with-deps ${{ matrix.browser }} | |
| - name: Install Playwright OS dependencies | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: pnpm exec playwright install-deps ${{ matrix.browser }} | |
| - name: Run Playwright tests | |
| run: pnpm exec playwright test --reporter=html --project=${{ matrix.browser }} | |
| - name: Upload Playwright results | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: playwright-report-${{ matrix.browser }} | |
| path: playwright-report/ | |
| retention-days: 30 |