Merge branch 'master' of https://github.com/approvals/ApprovalTests.Java #140
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: Run tests on JDK8 | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build-21-run-8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: ubuntu-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
ubuntu-maven- | |
- name: Set up JDK21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
- name: Turn off formatting | |
run: | | |
./set_formatting_off.sh | |
- name: Build with Maven | |
run: | | |
mvn -B install --file pom.xml | |
- name: Set up JDK8 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '8' | |
- uses: actions/checkout@v4 | |
with: | |
repository: approvals/ApprovalTests.Java.StarterProject | |
- name: Use local build | |
run: | | |
sed -i '/<artifactId>approvaltests<\/artifactId>/{N;s/<version>.*<\/version>/<version>100.0.0-SNAPSHOT<\/version>/}' pom.xml | |
- name: Run in JDK8 | |
run: | | |
java -version | |
mvn verify | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v5 | |
if: success() || failure() # always run even if the previous step fails | |
with: | |
report_paths: '**/target/surefire-reports/*.xml' | |