Skip to content

Commit 6dd8842

Browse files
committed
Add GitHub Actions CI workflow for automated testing on PRs
1 parent e5d7f82 commit 6dd8842

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ master, main ]
6+
push:
7+
branches: [ master, main ]
8+
9+
jobs:
10+
test:
11+
name: Run Tests
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
java-version: [8, 11, 17, 21]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up JDK ${{ matrix.java-version }}
23+
uses: actions/setup-java@v4
24+
with:
25+
java-version: ${{ matrix.java-version }}
26+
distribution: 'temurin'
27+
cache: maven
28+
29+
- name: Build and Test
30+
run: mvn -B verify --file pom.xml
31+
32+
- name: Upload Test Results
33+
if: always()
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: test-results-java-${{ matrix.java-version }}
37+
path: target/surefire-reports/
38+
retention-days: 7
39+

0 commit comments

Comments
 (0)