Add playwright E2E tests (#2174)

This commit is contained in:
Sam Freund
2025-12-04 22:25:48 -06:00
committed by GitHub
parent f821657d2b
commit 017b074eae
18 changed files with 421 additions and 46 deletions

View File

@@ -59,6 +59,49 @@ jobs:
- name: Build C++ examples
working-directory: photonlib-cpp-examples
run: ./gradlew build
playwright-tests:
name: "Playwright E2E tests"
runs-on: ubuntu-22.04
needs: [validation]
steps:
# Checkout code.
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force
- name: Install Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install mrcal deps
run: sudo apt-get update && sudo apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
- name: Setup tests
working-directory: photon-client
run: |
pnpm install
pnpm test-setup
- name: Prebuild Gradle
run: ./gradlew photon-targeting:build photon-core:build photon-server:build -x check
- name: Run Playwright tests
working-directory: photon-client
run: pnpm test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: photon-client/playwright-report/
retention-days: 30
build-gradle:
name: "Gradle Build"
runs-on: ubuntu-22.04