forked from mybatis/mybatis-3
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.8 KB
/
ci.yaml
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
name: Java CI
on: [workflow_dispatch, push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
cache: [maven]
distribution: [temurin]
java: [17, 21, 22, 23-ea, 24-ea]
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
- name: Print JDK Version
run: java -version
- name: Cache local Maven m2
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-m2
- name: Skip tests that require illegal reflective access
if: ${{ matrix.os == 'ubuntu-latest' }}
run: echo 'ARG_LINE=-D"excludedGroups=RequireIllegalAccess"' >> $GITHUB_ENV
- name: Skip tests that require illegal reflective access
if: ${{ matrix.os != 'ubuntu-latest' }}
run: echo 'ARG_LINE=-D"excludedGroups=TestcontainersTests,RequireIllegalAccess"' >> $GITHUB_ENV
- name: Active Profiles
run: ./mvnw help:active-profiles
- name: Test with Maven
if: ${{ matrix.os != 'windows-latest' }}
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"jacoco.skip=true" $ARG_LINE
- name: Test with Maven
if: ${{ matrix.os == 'windows-latest' }}
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"jacoco.skip=true" -D"excludedGroups=TestcontainersTests,RequireIllegalAccess"