Skip to content

Update pom.xml

Update pom.xml #283

Workflow file for this run

name: Build and Test
on:
workflow_dispatch:
pull_request_target:
types:
- opened
- reopened
- synchronize
permissions:
contents: write
pull-requests: write
jobs:
authorize:
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
build-test:
needs: authorize
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@v0.7.8
secrets: inherit
integration-tests:
name: Integration Test - Java ${{ matrix.java }} MongoDB ${{ matrix.mongodb }}
runs-on: ubuntu-latest
env:
LIQUIBOT_TOKEN: ${{ secrets.LIQUIBOT_PAT }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
strategy:
matrix:
java: [8, 11, 17]
mongodb: [5, 6, 7]
services:
mongodb:
image: mongo:${{ matrix.mongodb }}
ports:
- 27017-27019:27017-27019
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
# look for dependencies in maven
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: |
[
{
"id": "liquibase",
"url": "https://maven.pkg.github.com/liquibase/liquibase",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
},
{
"id": "liquibase-pro",
"url": "https://maven.pkg.github.com/liquibase/liquibase-pro",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
servers: |
[
{
"id": "liquibase-pro",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
},
{
"id": "liquibase",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
}
]
- 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 }} MongoDB ${{ matrix.mongodb }}
runs-on: ubuntu-latest
env:
LIQUIBOT_TOKEN: ${{ secrets.LIQUIBOT_PAT }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
strategy:
matrix:
java: [ 11, 17 ]
mongodb: [5, 6, 7]
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
# look for dependencies in maven
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: |
[
{
"id": "liquibase",
"url": "https://maven.pkg.github.com/liquibase/liquibase",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
},
{
"id": "liquibase-pro",
"url": "https://maven.pkg.github.com/liquibase/liquibase-pro",
"releases": {
"enabled": "false"
},
"snapshots": {
"enabled": "true",
"updatePolicy": "always"
}
}
]
servers: |
[
{
"id": "liquibase-pro",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
},
{
"id": "liquibase",
"username": "liquibot",
"password": "${{ secrets.LIQUIBOT_PAT }}"
}
]
- name: Build Cache
uses: actions/cache@v4.0.2
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 mongo-${{ matrix.mongodb }}
docker ps -a
- name: Harness Foundational Test Suite Run on Docker - Java ${{ matrix.java }}
run: mvn -Dtest="HarnessNoSqlCompatibility" -DdbName=mongodb clean package -DdbVersion=${{ matrix.mongodb }}
- name: Stop Docker Databases
if: always()
run: docker compose -f ./src/test/resources/docker/docker-compose.yml down mongo-${{ matrix.mongodb }}
- name: Archive Mongo Database Test Results
uses: actions/upload-artifact@v4
with:
name: mongodb-test-results
path: build/spock-reports