Skip to content

add playwright to gh action #81

add playwright to gh action

add playwright to gh action #81

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
# Give the workflow permission to deploy the Pages site
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
test:
name: Run all tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- run: yarn install
- name: Lint
run: yarn lint
- name: Type checking
run: yarn type-check
- name: Run unit tests
run: yarn test
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright E2E Tests
run: yarn test:e2e
- name: Upload Playwright Report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report
retention-days: 30
# Deploy the Pages site
deploy-report:
needs: test
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
with:
artifact_name: playwright-report