Skip to content

Split build into package and test #834

Split build into package and test

Split build into package and test #834

Workflow file for this run

name: Pull request
on:
pull_request:
branches: [ master ]
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-package: jdk
java-version: 21
cache: false
- uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: maven
- name: build
run: mvn -Pconcise,delombok -B fmt:check install test-compile -DskipTests -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: maven-${{ hashFiles('**/pom.xml') }}
restore-keys: maven
- uses: actions/upload-artifact@v4
with:
name: build
path: "**/target"
test:
needs: build
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ 11,17,21 ]
db: [ nodb,mysql,postgres,oracle18,oracle21 ]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-package: jdk
java-version: ${{ matrix.jdk }}
cache: false
- uses: actions/cache/restore@v4
with:
path: ~/.m2/repository
key: maven
- uses: actions/download-artifact@v4
with:
name: build
path: .
- name: test
run: mvn -Pconcise,delombox,only-${{ matrix.db }}-tests -B surefire:test -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn