-
Notifications
You must be signed in to change notification settings - Fork 133
56 lines (45 loc) · 1.39 KB
/
code-coverage.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
45
46
47
48
49
50
51
52
53
54
55
56
name: MegaMekLab CI with Code Coverage
on:
push:
branches: [master]
env:
GRADLE_OPTS: "-Dscan.link.VCS=https://github.com/MegaMek/megameklab/commit/${{ github.sha }}"
jobs:
code_coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
java-distribution: [temurin]
java-version: [17]
steps:
- uses: actions/checkout@v4
with:
path: megameklab
- name: Checkout MegaMek
uses: actions/checkout@v4
with:
repository: MegaMek/megamek
path: megamek
- name: Set up ${{ matrix.java-distribution }} JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.java-distribution }}
java-version: ${{ matrix.java-version }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
working-directory: megameklab
run: ./gradlew test
- name: Upload Test Logs on Failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cd-failure-logs
path: ./megameklab/megameklab/build/reports/
- name: CodeCov.io Coverage Report
uses: codecov/codecov-action@v4
with:
directory: ./megameklab/megameklab/build/reports/jacoco/test
fail_ci_if_error: false
verbose: true