-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (50 loc) · 1.75 KB
/
run-tests.yml
File metadata and controls
58 lines (50 loc) · 1.75 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: run-tests
on: [push]
jobs:
main-job:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- name: checkout
uses: "actions/checkout@v2"
- name: graalvm
uses: DeLaGuardo/setup-graalvm@5.0
with:
graalvm: '22.0.0.2'
java: 'java17'
arch: 'amd64'
- run: java -version
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Cache docker layers
uses: satackey/action-docker-layer-caching@v0.0.11
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
- name: maven
run: ./mvnw $SILENT clean test jacoco:report
env:
JAVA_OPTS: "-Xmx6g -Xms6g"
SILENT: "-B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: false
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Julio Faerman'
git config --global user.email 'faermanj@users.noreply.github.com'
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
fi
- name: Archive jacoco reports
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: target/site/**