-
Notifications
You must be signed in to change notification settings - Fork 74
51 lines (47 loc) · 1.31 KB
/
test-jdk-8.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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'