Skip to content

Commit 304fa27

Browse files
authored
Update maven.yml
1 parent b5bdbd4 commit 304fa27

1 file changed

Lines changed: 12 additions & 23 deletions

File tree

.github/workflows/maven.yml

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,29 @@
11
# this build is designed to replicate the Travis CI workflow
2-
name: Build with Maven
2+
name: Java CI with Maven
33

44
on:
55
push:
6-
branches: [ master ]
6+
branches: [ "master" ]
77
pull_request:
8-
branches: [ master ]
9-
workflow_dispatch:
8+
branches: [ "master" ]
109

1110
jobs:
1211
build:
12+
runs-on: ubuntu-latest
13+
1314
strategy:
1415
matrix:
15-
platform: [ ubuntu-latest ]
16-
java-version: [ 8 ]
17-
18-
runs-on: ${{ matrix.platform }}
19-
env:
20-
PLATFORM: ${{ matrix.platform }}
21-
JAVA_VERSION: ${{ matrix.java-version }}
16+
java-version: [8]
2217

2318
steps:
2419
- uses: actions/checkout@v4
25-
- name: Set up JDK
20+
21+
- name: Set up JDK ${{ matrix.java-version }}
2622
uses: actions/setup-java@v4
2723
with:
2824
java-version: ${{ matrix.java-version }}
29-
- name: Cache local Maven repository
30-
uses: actions/cache@v4
31-
with:
32-
path: ~/.m2/repository
33-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
34-
restore-keys: |
35-
${{ runner.os }}-maven-
36-
- name: Install dependencies
37-
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml
25+
distribution: 'corretto'
26+
cache: maven
27+
3828
- name: Build with Maven
39-
run: mvn test --batch-mode --file pom.xml
40-
29+
run: mvn clean install --file pom.xml

0 commit comments

Comments
 (0)