Skip to content

Commit 8afd0df

Browse files
authored
Port CI improvements from EasyPost Java (#25)
1 parent b31f64c commit 8afd0df

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
strategy:
1313
matrix:
1414
javaversion: [ "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19" ]
@@ -23,12 +23,32 @@ jobs:
2323
${{ runner.os }}-maven-
2424
- name: Install dependencies
2525
run: make install
26+
- name: Set up JDK for compilation
27+
uses: actions/setup-java@v3
28+
with:
29+
distribution: "zulu"
30+
java-version: "19" # Always use the latest JDK for building
31+
- name: Compile
32+
run: make build
2633
- name: Set up Java ${{ matrix.javaversion }}
2734
uses: actions/setup-java@v3
2835
with:
2936
distribution: "zulu"
3037
java-version: ${{ matrix.javaversion }}
31-
- name: Build and test with Maven
38+
- name: Run test with Java ${{ matrix.javaversion }}
39+
run: make test
40+
coverage:
41+
runs-on: ubuntu-20.04
42+
steps:
43+
- uses: actions/checkout@v3
44+
- name: Install dependencies
45+
run: make install
46+
- name: Set up JDK for compilation
47+
uses: actions/setup-java@v3
48+
with:
49+
distribution: "zulu"
50+
java-version: "19" # Always use the latest JDK for building
51+
- name: Test coverage
3252
run: make coverage
3353
- name: Load Rust cache
3454
if: github.ref == 'refs/heads/main'
@@ -46,7 +66,7 @@ jobs:
4666
github-token: ${{ secrets.GITHUB_TOKEN }}
4767
path-to-lcov: "./coverage.lcov"
4868
lint:
49-
runs-on: ubuntu-latest
69+
runs-on: ubuntu-20.04
5070
steps:
5171
- uses: actions/checkout@v3
5272
- name: Run CheckStyle checks
@@ -57,7 +77,7 @@ jobs:
5777
checkstyle_config: easypost_java_style.xml
5878
tool_name: "style_enforcer"
5979
security:
60-
runs-on: ubuntu-latest
80+
runs-on: ubuntu-20.04
6181
steps:
6282
- uses: actions/checkout@v3
6383
- name: Load Maven dependencies and CVE database cache

0 commit comments

Comments
 (0)