Add deployment workflow and update Dockerfile for application packaging #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Playwright UI Tests (JUnit) | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
env: | |
HEADLESS: true | |
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: 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/ | |
- name: Upload JaCoCo coverage report | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: jacoco-report | |
path: target/site/jacoco/ | |