forked from apache/shardingsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.49 KB
/
jacoco.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
name: Coverage
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11
- uses: actions/cache@v4
with:
path: ~/.m2/repository
key: shardingsphere-maven-third-party-e2e-cache-${{ github.sha }}
restore-keys: |
shardingsphere-maven-third-party-e2e-cache-
shardingsphere-maven-third-party-
- name: Install Project
run: ./mvnw clean install -T1C
- name: Set up JDK 8 for Jacoco
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 8
cache: 'maven'
- name: Run and Create code coverage
run: |
./mvnw --show-version --batch-mode --no-transfer-progress verify -Dmaven.test.failure.ignore=true -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false
chmod +x ./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh ${{ github.workspace }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: ${{ github.workspace }}/target/mergeReport/jacoco.xml