-
-
Notifications
You must be signed in to change notification settings - Fork 13
53 lines (44 loc) · 1.33 KB
/
tests.yml
File metadata and controls
53 lines (44 loc) · 1.33 KB
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
name: Tests
on:
push:
branches: [ main ]
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v6
# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v5
# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Run tests
run: ./gradlew test --stacktrace --info jacocoTestReport
- name: Upload Test Report
if: ${{ always() }}
uses: actions/upload-artifact@v6
with:
name: test-report-${{ matrix.os }}
path: build/reports/tests/test
- name: Upload HTML test coverage report
if: ${{ matrix.os == 'ubuntu-latest' && always() }}
uses: actions/upload-artifact@v6
with:
name: coverage-report
path: build/reports/jacoco/test/html