Skip to content

Commit 8811bd5

Browse files
authored
Update maven.yml
1 parent d65e297 commit 8811bd5

File tree

1 file changed

+17
-28
lines changed

1 file changed

+17
-28
lines changed

.github/workflows/maven.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
3-
4-
name: Java CI with Maven
5-
6-
on:
7-
push:
8-
branches: [ master ]
9-
pull_request:
10-
branches: [ master ]
11-
1+
name: Run Tests
2+
on: push
123
jobs:
13-
test:
14-
4+
run_tests:
155
runs-on: ubuntu-latest
16-
176
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-java@v2
20-
with:
21-
java-version: '17'
22-
distribution: 'adopt'
23-
cache: 'maven'
24-
- name: Cache Packages
25-
uses: actions/cache@v1
26-
with:
27-
path: ~/.m2
28-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
29-
restore-keys: ${{ runner.os }}-m2
30-
- name: Build and test project with Maven
31-
run: mvn -B test --file pom.xml
7+
- name: Checkout the repository
8+
uses: actions/checkout@v2
9+
- name: Set up JDK 17
10+
uses: actions/setup-java@v1
11+
with:
12+
java-version: 17
13+
- name: Cache Maven packages
14+
uses: actions/cache@v2
15+
with:
16+
path: ~/.m2
17+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
18+
restore-keys: ${{ runner.os }}-m2
19+
- name: Run tests with Maven
20+
run: mvn -B test --file pom.xml

0 commit comments

Comments
 (0)