-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (54 loc) · 1.5 KB
/
tests.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
name: 'Tests'
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'
merge_group:
branches:
- 'master'
paths-ignore:
- 'README.md'
- '.gitignore'
- '.gitattributes'
- '.github/workflows/**'
- '!.github/workflows/tests.yml'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 21, x ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Set executable flag on gradlew
run: chmod +x gradlew
- name: Execute tests
env:
GH_PACKAGES_READ_TOKEN: ${{ secrets.PACKAGES_READ_TOKEN }}
run: ./gradlew test
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: github.ref != 'refs/heads/master' && always()
with:
check_name: Test results JDK ${{ matrix.java }}
comment_title: Test results JDK ${{ matrix.java }}
files: |
/github/workspace/**/build/test-results/**/*.xml
- name: Generate coverage
if: ${{ matrix.java == 21 }}
run: ./gradlew koverXmlReportJvm
- name: Upload coverage
uses: codecov/codecov-action@v5.1.2
if: ${{ matrix.java == 21 }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/kover/reportJvm.xml