Skip to content

Commit 4038b0c

Browse files
Add GitHub Action for Maven tests
1 parent cfe9550 commit 4038b0c

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/maven.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,29 @@ on:
1818

1919
jobs:
2020
build:
21-
name: Maven test on Java ${{ matrix.Java }}
21+
name: Maven test on Java ${{ matrix.java }}
2222
runs-on: ubuntu-latest
2323
env:
2424
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '15'
2525
strategy:
2626
matrix:
2727
java: ['20']
28-
steps:
29-
# - name: Workflow Telemetry
30-
# uses: runforesight/workflow-telemetry-action@v1.8.7
31-
- uses: actions/checkout@v3
32-
- name: Set up JDK 20
33-
uses: actions/setup-java@v3
34-
with:
35-
java-version: ${{ matrix.java }}
36-
distribution: 'adopt'
37-
cache: maven
38-
- name: Maven Tests
39-
run: mvn -B -X -e clean compile --file pom.xml --batch-mode --fail-fast
28+
steps:
29+
# Checkout the repository code
30+
- uses: actions/checkout@v3
31+
32+
# Set up JDK 20
33+
- name: Set up JDK 20
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: ${{ matrix.java }}
37+
distribution: 'adopt'
38+
cache: maven
39+
40+
# Build the project (compiles and packages the code)
41+
- name: Build the project
42+
run: mvn -B -X -e clean package --file pom.xml --batch-mode --fail-fast
43+
44+
# Run tests
45+
- name: Run tests
46+
run: mvn test -B -X -e --file pom.xml --batch-mode --fail-fast

0 commit comments

Comments
 (0)