build(deps): bump liquibase/build-logic from 0.3.3 to 0.3.5 #35
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: Build and Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
build: | |
name: Build & Package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Build and Package | |
run: mvn -B dependency:go-offline clean package -DskipTests=true | |
- name: Get Artifact ID | |
id: get-artifact-id | |
run: echo "::set-output name=artifact_id::$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" | |
- name: Save Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.get-artifact-id.outputs.artifact_id }}-artifacts | |
path: | | |
target/* | |
- name: Save Event File | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Event File | |
path: ${{ github.event_path }} | |
outputs: | |
artifact_id: ${{ steps.get-artifact-id.outputs.artifact_id }} | |
unit-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ 8, 11, 17, 18 ] | |
os: [ ubuntu-latest, windows-latest ] | |
name: Test Java ${{ matrix.java }} - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{needs.build.outputs.artifact_id}}-artifacts | |
path: ./target | |
- name: Run Tests | |
run: mvn -B jacoco:prepare-agent surefire:test | |
- name: Archive Test Results - ${{ matrix.os }} | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-reports-jdk-${{ matrix.java }}-${{ matrix.os }} | |
path: | | |
**/target/surefire-reports | |
**/target/jacoco.exec | |
integration-tests: | |
name: Integration Test - Java ${{ matrix.java }} | |
runs-on: ubuntu-latest | |
needs: unit-test | |
strategy: | |
matrix: | |
java: [8, 11, 17] | |
mongodb: [4] | |
services: | |
mongodb: | |
image: mongo:${{ matrix.mongodb }} | |
ports: | |
- 27017-27019:27017-27019 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Integration Test - Java ${{ matrix.java }} | |
run: mvn -B clean test verify -Prun-its --file pom.xml | |
harness-tests: | |
name: Harness Tests - Java ${{ matrix.java }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ 11, 17 ] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Build Cache | |
uses: actions/cache@v3.0.5 | |
with: | |
key: build-${{ github.run_number }}-${{ github.run_attempt }} | |
path: | | |
**/target/** | |
~/.m2/repository/org/liquibase/ | |
- name: Start Database | |
run: | | |
docker ps -a | |
docker-compose -f ./src/test/resources/docker/docker-compose.yml up -d | |
docker ps -a | |
- name: Harness Foundational Test Suite Run - Java ${{ matrix.java }} | |
run: mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb clean package | |
- name: Stop Docker Databases | |
if: always() | |
run: docker-compose -f ./src/test/resources/docker/docker-compose.yml down | |
- name: Archive Mongo Database Test Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mongodb-test-results | |
path: build/spock-reports |