This repository was archived by the owner on Apr 12, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (46 loc) · 1.7 KB
/
test.yml
File metadata and controls
55 lines (46 loc) · 1.7 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
54
55
name: tests
on:
workflow_dispatch:
workflow_call:
env:
JDK_VERSION: 19
GRADLE_OPTS: -Dorg.gradle.jvmargs="-XX:MaxMetaspaceSize=2g"
jobs:
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 11, 17, 19 ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v4
- name: Set up Java JDK
uses: actions/setup-java@v4
with:
java-version: ${{ env.JDK_VERSION }}
distribution: temurin
# gradle-build-action already does the caching
- name: Setup gradle
uses: gradle/gradle-build-action@v2
env:
ORG_GRADLE_PROJECT_kipher.toolchain.compilerVersion: ${{ matrix.java }}
- name: Test with JDK ${{ matrix.java }} on Windows
if: matrix.os == 'windows-latest'
run: ./gradlew clean test --stacktrace --no-daemon --no-parallel
- name: Test with JDK ${{ matrix.java }}
if: matrix.os != 'windows-latest'
run: ./gradlew clean test --stacktrace
- name: Codacy coverage report
if: matrix.os == 'ubuntu-latest' && matrix.java == 19
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./kipher-coverage/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
- name: Codecov coverage report
if: matrix.os == 'ubuntu-latest' && matrix.java == 19
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./kipher-coverage/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml
flags: unit