-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.25 KB
/
maven.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: build-on-push
on: [ push ]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 14
- name: Cache the Maven packages to speed up build
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Execute tests and compute coverage
run: mvn clean test
- name: Generate coverage report
run: mvn jacoco:report
- uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: target/site/jacoco/jacoco.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
publish-job:
runs-on: ubuntu-latest
needs: [ build_and_test ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 14
- run: mvn -B package --file pom.xml -DskipTests
- run: mkdir staging && cp target/*jar-with-dependencies.jar staging
- uses: actions/upload-artifact@v1
with:
name: Package
path: staging