Skip to content

Update .gitignore and configure Playwright to run in headless mode #2

Update .gitignore and configure Playwright to run in headless mode

Update .gitignore and configure Playwright to run in headless mode #2

name: Playwright UI Tests (JUnit)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Verify Maven installation
run: mvn -version
- name: Build project (skip tests)
run: |
mvn dependency:go-offline -Pproduction
mvn clean package -DskipTests -Pproduction
- name: Install Playwright CLI (Java)
run: mvn exec:exec -Dexec.executable="npx" -Dexec.args="playwright install --with-deps"
- name: Run JUnit tests
run: mvn test
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: junit-test-reports
path: target/surefire-reports/