-
Notifications
You must be signed in to change notification settings - Fork 7
71 lines (63 loc) · 1.83 KB
/
pr.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
---
name: Pull Request
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build and test Java ${{ matrix.java }}
permissions:
checks: write
pull-requests: write
env:
MAIN_JAVA_VER: 11
RUN_PYTHON_BIN: ${{ vars.RUN_PYTHON_BIN }}
strategy:
matrix:
java: [11, 20]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Setup Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.20.1'
- name: get Python location
id: python-location
run: |
echo "python-bin-location=$(echo $pythonLocation)/bin" >> $GITHUB_OUTPUT
- name: Verify the project and create coverage report
env:
EXHORT_PYTHON3_PATH: "${{steps.python-location.outputs.python-bin-location}}/python3"
EXHORT_PIP3_PATH: "${{steps.python-location.outputs.python-bin-location}}/pip3"
run: |
mvn verify -Pits,cov -B -ff
- name: Report test summary
if: ${{ matrix.java == env.MAIN_JAVA_VER && always() }}
uses: EnricoMi/publish-unit-test-result-action@v2
with:
test_changes_limit: 0
files: |
./target/surefire-reports/*.xml
./target/junit-platform/TEST-junit-jupiter.xml
- name: Upload coverage reports
if: ${{ matrix.java == env.MAIN_JAVA_VER }}
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./target/site/jacoco/jacoco.xml