-
Notifications
You must be signed in to change notification settings - Fork 27
54 lines (44 loc) · 1.4 KB
/
build.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
name: build
on:
pull_request_target:
push:
branches: master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Check
run: ./gradlew check
- name: Run Jacoco
run: ./gradlew jacocoTestReport
- name: Upload Report
uses: 'actions/upload-artifact@v2'
with:
name: report.xml
path: ${{ github.workspace }}/ipv8/build/reports/jacoco/test/jacocoTestReport.xml
- name: Add coverage to PR
id: jacoco
uses: madrapps/[email protected]
with:
paths: ${{ github.workspace }}/ipv8/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 60
min-coverage-changed-files: 80
- name: Get the Coverage info
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}