Skip to content

Commit e58fa24

Browse files
authored
Merge pull request #162 from nanotaboada/feature/maven.yml
chore(ci): simplify Java CI workflow
2 parents 82bf55d + 9c3cb5e commit e58fa24

1 file changed

Lines changed: 5 additions & 23 deletions

File tree

.github/workflows/maven.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,23 @@ on:
99
pull_request:
1010
branches: [ master ]
1111

12+
env:
13+
JAVA_VERSION: 21
14+
1215
jobs:
1316
verify:
1417
runs-on: ubuntu-latest
1518
steps:
1619
- name: Checkout repository
1720
uses: actions/checkout@v4
1821

19-
- name: Cache Git history
20-
uses: actions/cache@v4
21-
with:
22-
path: .git
23-
key: ${{ runner.os }}-git-${{ github.sha }}
24-
restore-keys: |
25-
${{ runner.os }}-git-
26-
27-
- name: Set up OpenJDK 21
22+
- name: Set up OpenJDK ${{ env.JAVA_VERSION }}
2823
uses: actions/setup-java@v4
2924
with:
30-
java-version: '21'
25+
java-version: ${{ env.JAVA_VERSION }}
3126
distribution: 'adopt'
3227
cache: 'maven'
3328

34-
- name: Cache local Maven repository
35-
uses: actions/cache@v4
36-
with:
37-
path: ~/.m2/repository
38-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
39-
restore-keys: |
40-
${{ runner.os }}-maven-
41-
4229
- name: Compile and verify with Maven
4330
run: mvn verify --file pom.xml
4431

@@ -55,11 +42,6 @@ jobs:
5542
matrix:
5643
service: [codecov, codacy]
5744
steps:
58-
- name: Checkout repository
59-
uses: actions/checkout@v4
60-
with:
61-
fetch-depth: ${{ matrix.service == 'codacy' && 0 || 1 }}
62-
6345
- name: Download JaCoCo coverage report artifact
6446
uses: actions/download-artifact@v4
6547
with:

0 commit comments

Comments
 (0)