Skip to content

Commit 2926d3b

Browse files
authored
ci: add playwright tests to PR checks
1 parent d7bdffc commit 2926d3b

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

.github/workflows/ci-run-tests.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ on:
1010
- 'package.json'
1111

1212
jobs:
13-
tests:
14-
name: Run Tests
13+
tests-python:
14+
name: Run Tests (Python)
1515
runs-on: ubuntu-latest
1616
container: ghcr.io/ietf-tools/datatracker-app-base:latest
1717

@@ -69,3 +69,39 @@ jobs:
6969
with:
7070
name: coverage
7171
path: coverage.json
72+
73+
tests-playwright:
74+
name: Run Tests (Playwright)
75+
runs-on: macos-latest
76+
strategy:
77+
fail-fast: false
78+
matrix:
79+
project: [chromium, firefox]
80+
81+
steps:
82+
- uses: actions/checkout@v3
83+
84+
- uses: actions/setup-node@v2
85+
with:
86+
node-version: '18'
87+
88+
- name: Run all tests
89+
run: |
90+
echo "Installing dependencies..."
91+
yarn
92+
echo "Installing Playwright..."
93+
cd playwright
94+
mkdir test-results
95+
npm ci
96+
npx playwright install --with-deps ${{ matrix.project }}
97+
echo "Running tests..."
98+
npx playwright test --project=${{ matrix.project }}
99+
100+
- name: Upload Report
101+
uses: actions/upload-artifact@v3.0.0
102+
if: ${{ always() }}
103+
continue-on-error: true
104+
with:
105+
name: playwright-results-${{ matrix.project }}
106+
path: playwright/test-results/
107+
if-no-files-found: ignore

0 commit comments

Comments
 (0)