[java] add a practice test suite to simulate real world usage #3
Workflow file for this run
This file contains 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
# This workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Integration Tests | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'java/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'java/**' | |
workflow_dispatch: | |
jobs: | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: axel-op/googlejavaformat-action@v3 | |
with: | |
args: "--replace" | |
files: "java/test-project/**/*.java" | |
skip-commit: true | |
- name: Print diffs | |
run: git --no-pager diff --exit-code | |
integration: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
profile: [junit4, junit5, testng] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'temurin' | |
- name: Remove driver directories | |
run: | | |
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER | |
- name: Install main bindings snapshot | |
run: cd java/main && mvn clean package install -DskipTests -Dgpg.skip=true | |
- name: Install Junit4 bindings snapshot | |
run: cd java/junit4 && mvn clean package install -DskipTests -Dgpg.skip=true | |
- name: Install Junit5 bindings snapshot | |
run: cd java/junit4 && mvn clean package install -DskipTests -Dgpg.skip=true | |
- name: Install TestNG bindings snapshot | |
run: cd java/testng && mvn clean package install -DskipTests -Dgpg.skip=true | |
- name: Test with ${{ matrix.profile }} | |
env: | |
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
run: cd java/test-project && mvn clean test -P${{ matrix.profile }} |