feat: allow DefaultSqlSessionFactory
to provide a custom SqlSession
#2162
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
java: [11, 17, 21, 22-ea, 23-ea] | |
distribution: ['temurin'] | |
fail-fast: false | |
max-parallel: 4 | |
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
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: Set argLine command line option | |
if: ${{ matrix.java == '11' }} | |
run: echo 'ARG_LINE=-D"argLine=--illegal-access=permit"' >> $GITHUB_ENV | |
- name: Run all tests | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java == '11' }} | |
run: echo 'ARG_LINE=-D"excludedGroups="' >> $GITHUB_ENV | |
- name: Skip tests that require illegal reflective access | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java != '11' }} | |
run: echo 'ARG_LINE=-D"excludedGroups=RequireIllegalAccess"' >> $GITHUB_ENV | |
- name: Skip tests that require illegal reflective access | |
if: ${{ matrix.os != 'ubuntu-latest' && matrix.java != '11' }} | |
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' && matrix.java == '11' }} | |
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"jacoco.skip=true" -D"argLine=--illegal-access=permit" | |
- name: Test with Maven | |
if: ${{ matrix.os == 'windows-latest' && matrix.java != '11' }} | |
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"jacoco.skip=true" -D"excludedGroups=TestcontainersTests,RequireIllegalAccess" |