Test infrastructure #276
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
name: Java CI | |
on: | |
push: | |
paths: | |
- 'java/**' | |
- '.github/workflows/java**' | |
pull_request: | |
paths: | |
- 'java/**' | |
- '.github/workflows/java**' | |
schedule: | |
# weekly build every FRI | |
- cron: "0 6 * * 5" | |
jobs: | |
matrix_build: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: [ ubuntu-latest, macOS-latest, windows-latest ] | |
java: [ 8, 11, 16, 17 ] | |
name: Java ${{ matrix.java }} Build on ${{ matrix.operating-system }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
- name: Cache gradle wrapper | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('java/**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
#### BEGIN cucumber | |
- name: build cucumber with maven | |
working-directory: java/cucumber | |
run: mvn -B clean package --file pom.xml | |
#### END cucumber | |
#### BEGIN fitnesse | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/fitnesse | |
run: ./gradlew test | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/fitnesse | |
#fitnesse breaks with 8.0 | |
gradle-version: 7.6 | |
arguments: test --warning-mode all | |
#### END fitnesse | |
#### BEGIN hamcrest | |
- name: build hamcrest with maven | |
working-directory: java/hamcrest | |
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail" | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/hamcrest | |
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/hamcrest | |
gradle-version: current | |
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail | |
- name: assure one failing test | |
working-directory: java/hamcrest | |
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action() FAILED'" | |
#### END hamcrest | |
#### BEGIN hue4j5 | |
- name: build hue4j5 with maven | |
working-directory: java/hue4j5 | |
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail" | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/hue4j5 | |
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/hue4j5 | |
gradle-version: current | |
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail | |
- name: assure one failing test | |
working-directory: java/hue4j5 | |
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action() FAILED'" | |
#### END hue4j5 | |
#### BEGIN jqwik | |
- name: build jqwik with maven | |
working-directory: java/jqwik | |
run: mvn -B clean package --file pom.xml | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/jqwik | |
run: ./gradlew test --warning-mode all | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/jqwik | |
gradle-version: current | |
arguments: test --warning-mode all | |
#### END jqwik | |
#### BEGIN junit4 | |
- name: build junit4 with maven | |
working-directory: java/junit4 | |
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail" | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/junit4 | |
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/junit4 | |
gradle-version: current | |
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail | |
- name: assure one failing test | |
working-directory: java/junit4 | |
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action FAILED'" | |
#### END junit4 | |
#### BEGIN junit5 | |
- name: build junit5 with maven | |
working-directory: java/junit5 | |
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail" | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/junit5 | |
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/junit5 | |
gradle-version: current | |
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail | |
- name: assure one failing test | |
working-directory: java/junit5 | |
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > fail() FAILED'" | |
#### END junit5 | |
#### BEGIN spock | |
- name: build spock with maven | |
working-directory: java/spock | |
run: mvn -B clean package --file pom.xml -Dtest="ThingSpec#notfail" | |
- name: assure one failing test | |
working-directory: java/spock | |
run: "sh ../../.scripts/assure_failing_test.sh 'mvn -B verify' 'ThingSpec.it should call for action:13 Condition not satisfied:'" | |
#### END spock | |
#### BEGIN truth | |
- name: build truth with maven | |
working-directory: java/truth | |
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail" | |
# gradlew: | |
- name: build with gradlew | |
working-directory: java/truth | |
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail | |
# gradle: | |
- uses: eskatos/gradle-command-action@v2 | |
with: | |
build-root-directory: java/truth | |
gradle-version: current | |
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail | |
- name: assure one failing test | |
working-directory: java/truth | |
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'truth.ComparisonFailureWithFacts at ThingTest.java:11'" | |
#### END truth | |
docker_build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
#### BEGIN junit5 | |
- name: docker junit5 | |
working-directory: java/junit5 | |
run: "sh ../../.scripts/assure_failing_test.sh './docker_test.sh' 'ThingTest > fail() FAILED'" | |
#### END junit5 |