ditch circleci, switch yarn to pnpm, and update husky #24
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: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Install Playwright Browsers | |
| run: pnpm playwright install --with-deps | |
| - name: Run Playwright tests | |
| env: | |
| AIRTABLE_PAT: ${{ secrets.AIRTABLE_PAT }} | |
| run: pnpm test:e2e:headless | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| id: artifact-upload | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 30 | |
| - name: Comment PR with artifact link | |
| if: failure() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const runId = context.runId; | |
| const repo = context.repo; | |
| const artifactUrl = `https://github.com/${repo.owner}/${repo.repo}/actions/runs/${runId}`; | |
| const comment = `## ❌ Playwright Tests Failed | |
| The Playwright tests have failed. Please download the test report artifact to see detailed information about the failures: | |
| 📊 [View test run and download artifact](${artifactUrl}) | |
| **How to view the report:** | |
| 1. Click the link above | |
| 2. Scroll to the bottom to the "Artifacts" section | |
| 3. Download the \`playwright-report\` artifact | |
| 4. Extract the zip file and open \`index.html\` in your browser | |
| The report includes screenshots, videos, and detailed traces of the failed tests.`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: repo.owner, | |
| repo: repo.repo, | |
| body: comment | |
| }); |