forked from tronprotocol/java-tron
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (75 loc) · 2.46 KB
/
coverage-update-baseline.yml
File metadata and controls
92 lines (75 loc) · 2.46 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Base Coverage Upload
on:
push:
branches: [ 'develop', 'release_**' ]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-base-coverage:
name: Build Base Coverage
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v5
with:
java-version: '8'
distribution: 'temurin'
cache: 'gradle'
- name: Check Java version
run: java -version
- name: Grant execute permission
run: chmod +x gradlew
- name: Stop Gradle daemon
run: ./gradlew --stop || true
- name: Build
run: ./gradlew clean build --no-daemon --no-build-cache --parallel
- name: Generate JaCoCo report
run: ./gradlew jacocoTestReport --no-daemon --no-build-cache
- name: Upload coverage artifacts
uses: actions/upload-artifact@v6
with:
name: base-jacoco-xml
path: |
actuator/build/reports/jacoco/test/jacocoTestReport.xml
chainbase/build/reports/jacoco/test/jacocoTestReport.xml
common/build/reports/jacoco/test/jacocoTestReport.xml
consensus/build/reports/jacoco/test/jacocoTestReport.xml
crypto/build/reports/jacoco/test/jacocoTestReport.xml
framework/build/reports/jacoco/test/jacocoTestReport.xml
plugins/build/reports/jacoco/test/jacocoTestReport.xml
if-no-files-found: error
upload-base-coverage:
name: Upload Base Coverage to Codecov
needs: build-base-coverage
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repo
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Download coverage artifacts
uses: actions/download-artifact@v7
with:
name: base-jacoco-xml
path: coverage-artifacts
- name: Show coverage files
run: find coverage-artifacts -type f | sort
- name: Upload base coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage-artifacts
root_dir: ./
gcov_executable: ''
override_branch: ${{ github.ref_name }}
fail_ci_if_error: true
verbose: true