Skip to content

Setup basic e2e tests #6

Setup basic e2e tests

Setup basic e2e tests #6

Workflow file for this run

name: Playwright Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16.19.0
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install and build the project
run: |
yarn
yarn build
- name: Change directory to e2e-react
run: cd packages/e2e-react
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- name: Upload Playwright report
uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/e2e-react/playwright-report/
retention-days: 30