Skip to content

Playwright

Playwright #19

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
APP: spinntektsmelding-frontend
IMAGE: ghcr.io/${{ github.repository }}/spinntektsmelding-frontend:${{ github.sha }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22.6'
cache: 'yarn'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: yarn install --immutable
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30