Skip to content

Commit 0d9aa60

Browse files
committed
Adding a verification step for JDK 7
1 parent 3fa10fc commit 0d9aa60

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/test.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,36 @@ jobs:
3434
- name: Run lint
3535
run: ./mvnw verify -B -Dhttps.protocols=TLSv1.2 -DskipTests
3636

37+
jdk7-verification:
38+
name: JDK 7 verification
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 5
41+
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v4
45+
46+
- name: Set up JDK 8
47+
uses: actions/setup-java@v4
48+
with:
49+
java-version: '8'
50+
distribution: 'temurin'
51+
52+
- name: Cache Maven packages
53+
uses: actions/cache@v4
54+
with:
55+
path: ~/.m2
56+
key: ${{ runner.os }}-m2-${{ github.ref }}-${{ hashFiles('**/pom.xml') }}-jdk7
57+
restore-keys: |
58+
${{ runner.os }}-m2-${{ github.ref }}-
59+
${{ runner.os }}-m2-
60+
61+
- name: Build JMXFetch
62+
run: ./mvnw clean package -DskipTests
63+
64+
- name: Run using JDK 7
65+
run: docker run -i --rm -v $(pwd):/app -w /app openjdk:7-jdk java -jar ./target/jmxfetch-0.49.9-SNAPSHOT-jar-with-dependencies.jar --help
66+
3767
test:
3868
name: Test (OpenJDK ${{ matrix.java-version }})
3969
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)