Skip to content

Create LICENSE (#1027) #866

Create LICENSE (#1027)

Create LICENSE (#1027) #866

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
env:
GITHUB_TOKEN: ${{ github.event_name == 'push' && secrets.VWC_GITHUB_TOKEN || github.token }}
jobs:
test:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
browser: [chromium, firefox]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Cache Playwright browsers
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install dependencies
run: npm ci
- name: Build Next.js application
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.VWC_GITHUB_TOKEN || github.token }}
- name: Install Playwright Browsers
run: npx playwright install --with-deps ${{ matrix.browser }}
- name: Run Playwright tests on ${{ matrix.browser }}
run: npx playwright test --project=${{ matrix.browser }}
env:
GITHUB_TOKEN: ${{ secrets.VWC_GITHUB_TOKEN || github.token }}
- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.browser }}
path: playwright-report/
retention-days: 30