Skip to content

Refactor Playwright workflow #10

Refactor Playwright workflow

Refactor Playwright workflow #10

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, develop, feat/#96] # TODO: remove feat/#96 when done
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.14.3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV
- name: Install dependencies
run: pnpm i --frozen-lockfile
- name: Cache playwright binaries
uses: actions/cache@v3
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Build
run: pnpm run build
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30