Skip to content

Commit 7886be8

Browse files
authored
Merge pull request #6 from camjjames/copilot/fix-2a33151e-5f87-49d3-a048-7b9c28ea8dfb
Upgrade to JDK 23 and add GitHub Actions CI workflow
2 parents 1b87639 + bd8a857 commit 7886be8

3 files changed

Lines changed: 74 additions & 2 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2.1
33
jobs:
44
build:
55
docker:
6-
- image: cimg/openjdk:17.0
6+
- image: cimg/openjdk:23.0
77
steps:
88
# Checkout the code as the first step.
99
- checkout

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java-version: ['17', '21', '23']
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up JDK ${{ matrix.java-version }}
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: ${{ matrix.java-version }}
23+
distribution: 'temurin'
24+
25+
- name: Cache Maven packages
26+
uses: actions/cache@v4
27+
with:
28+
path: ~/.m2
29+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
30+
restore-keys: ${{ runner.os }}-m2
31+
32+
- name: Run tests
33+
run: mvn clean test
34+
35+
- name: Generate test report
36+
run: mvn jacoco:report
37+
38+
- name: Upload coverage to Codecov
39+
if: matrix.java-version == '23'
40+
uses: codecov/codecov-action@v4
41+
with:
42+
file: ./target/site/jacoco/jacoco.xml
43+
fail_ci_if_error: false
44+
45+
build:
46+
runs-on: ubuntu-latest
47+
needs: test
48+
49+
steps:
50+
- uses: actions/checkout@v4
51+
52+
- name: Set up JDK 23
53+
uses: actions/setup-java@v4
54+
with:
55+
java-version: '23'
56+
distribution: 'temurin'
57+
58+
- name: Cache Maven packages
59+
uses: actions/cache@v4
60+
with:
61+
path: ~/.m2
62+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
63+
restore-keys: ${{ runner.os }}-m2
64+
65+
- name: Build with Maven
66+
run: mvn clean compile package -DskipTests
67+
68+
- name: Upload artifacts
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: jar-artifacts
72+
path: target/*.jar

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5252
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5353

54-
<java.version>17</java.version>
54+
<java.version>23</java.version>
5555
<java.showDeprecation>true</java.showDeprecation>
5656
<java.showWarnings>true</java.showWarnings>
5757
<java.optimize>true</java.optimize>

0 commit comments

Comments
 (0)