-
Notifications
You must be signed in to change notification settings - Fork 14
63 lines (54 loc) · 1.63 KB
/
coverage.yml
File metadata and controls
63 lines (54 loc) · 1.63 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
59
60
61
62
63
name: Coverage
on:
push:
branches: [main]
schedule:
# Weekly on Sunday at 02:00 UTC
- cron: '0 2 * * 0'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
name: JaCoCo Coverage Report
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Run tests with coverage
run: ./gradlew test fuzzTest jacocoTestReport --no-daemon
continue-on-error: true
- name: Upload JaCoCo report
uses: actions/upload-artifact@v4
with:
name: jacoco-report
path: testcase/build/jacocoHtml/
retention-days: 30
- name: Upload coverage XML
uses: actions/upload-artifact@v4
with:
name: jacoco-xml
path: testcase/build/reports/jacoco/test/jacocoTestReport.xml
retention-days: 30
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: testcase/build/reports/jacoco/test/jacocoTestReport.xml
flags: systemtest
fail_ci_if_error: false
verbose: true