-
Notifications
You must be signed in to change notification settings - Fork 11
91 lines (76 loc) · 2.21 KB
/
gradle-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
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
name: Gradle Build
on:
push:
branches:
- master
- develop
pull_request:
jobs:
gradle:
strategy:
matrix:
os: [
macos-latest,
windows-latest
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
- uses: suisei-cn/actions-download-file@v1.3.0
name: Download ANTLR
with:
url: "https://www.antlr.org/download/antlr-4.9.2-complete.jar"
target: .
- uses: gradle/gradle-build-action@v2
with:
arguments: build --info
gradle-version: 7.2
- name: Upload Gradle test report
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: gradle-test-report-${{ matrix.os }}
path: build/reports/tests/test/
- name: Print J2EO test report
run: |
cd ./src/test/resources/
python ./test_report.py
gradle_ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 11
- run: |
wget https://www.antlr.org/download/antlr-4.9.2-complete.jar
- uses: gradle/gradle-build-action@v2
with:
arguments: build --info
gradle-version: 7.2
- name: Upload Gradle test report
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: gradle-test-report-ubuntu-latest
path: build/reports/tests/test/
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: ./build/reports/jacoco/test/
fail_ci_if_error: false
flags: unittests
name: codecov-umbrella
path_to_write_report: ./build/reports/codecov_report.txt
verbose: true
- name: Print J2EO test report
run: |
cd ./src/test/resources/
python ./test_report.py