test: Operationalize playwright tests #1180
This file contains 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 | |
on: | |
pull_request: | |
jobs: | |
pre-commit: | |
uses: radiorabe/actions/.github/workflows/[email protected] | |
test-yarn: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: none | |
checks: write | |
contents: none | |
deployments: none | |
issues: none | |
packages: none | |
pull-requests: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
id-token: none | |
strategy: | |
matrix: | |
node-version: [22] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- run: yarn install --immutable | |
- run: yarn lint --format=json --output-file=eslint_report.json --since=37baf355806bdfdf5d6db7ec3e1d223640638206 | |
continue-on-error: true | |
- name: Annotate Code Linting Results | |
uses: ataylorme/eslint-annotate-action@v3 | |
with: | |
report-json: "eslint_report.json" | |
only-pr-files: false | |
continue-on-error: true | |
- run: yarn tsc | |
- run: yarn test | |
test-playwright: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: none | |
checks: write | |
contents: none | |
deployments: none | |
issues: none | |
packages: none | |
pull-requests: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
id-token: none | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'yarn' | |
- run: yarn install --immutable | |
- run: npx playwright install --with-deps | |
- run: npx playwright test | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 |