Skip to content

Refactor test assertion for title in example.spec.ts #25

Refactor test assertion for title in example.spec.ts

Refactor test assertion for title in example.spec.ts #25

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, develop, feat/#96] #TODO remove feat/#96
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8.14.3
- uses: actions/setup-node@v4
with:
node-version: 20.x
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@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: pnpm exec playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- name: Build
run: pnpm run build
- name: Run Playwright tests
run: PLAYWRIGHT_JSON_OUTPUT_NAME=results.json pnpm exec playwright test --reporter json
- uses: daun/playwright-report-summary@v3
with:
report-file: results.json
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30