Skip to content

Commit

Permalink
Merge pull request #437 from liquibase/DAT-15505
Browse files Browse the repository at this point in the history
DAT 15505 Liquibase Extensions Parent POM
  • Loading branch information
jandroav authored Oct 19, 2023
2 parents 791d02d + c164aed commit 2ded8d0
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 675 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/attach-artifact-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ on:
jobs:

attach-artifact-to-release:
uses: liquibase/build-logic/.github/workflows/extension-attach-artifact-release.yml@v0.4.9
uses: liquibase/build-logic/.github/workflows/extension-attach-artifact-release.yml@v0.5.0
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/build-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
nightly-build:
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@v0.4.9
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@v0.5.0
with:
nightly: true
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ on:

jobs:
create-release:
uses: liquibase/build-logic/.github/workflows/create-release.yml@v0.4.9
uses: liquibase/build-logic/.github/workflows/create-release.yml@v0.5.0
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
release:
uses: liquibase/build-logic/.github/workflows/extension-release-published.yml@v0.4.9
uses: liquibase/build-logic/.github/workflows/extension-release-published.yml@v0.5.0
secrets: inherit

deploy_xsd:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ on:

jobs:
security-scan:
uses: liquibase/build-logic/.github/workflows/synk-nightly.yml@v0.4.9
uses: liquibase/build-logic/.github/workflows/synk-nightly.yml@v0.5.0
secrets: inherit
168 changes: 3 additions & 165 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,177 +10,15 @@ on:

jobs:
build:
name: Build & Package
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LIQUIBOT_TOKEN: ${{ secrets.LIQUIBOT_PAT }}
GPM_USERNAME: "liquibot"
GPM_PASSWORD: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
# look for dependencies in maven
- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v21
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 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 }}
env:
LIQUIBOT_TOKEN: ${{ secrets.LIQUIBOT_PAT }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
needs: build
steps:
- uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
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@v21
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 }}"
}
]
- 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
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@v0.5.0
secrets: inherit

integration-tests:
name: Integration Test - Java ${{ matrix.java }}
runs-on: ubuntu-latest
env:
LIQUIBOT_TOKEN: ${{ secrets.LIQUIBOT_PAT }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
needs: unit-test
strategy:
matrix:
java: [8, 11, 17]
Expand Down Expand Up @@ -336,4 +174,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: mongodb-test-results
path: build/spock-reports
path: build/spock-reports
Loading

0 comments on commit 2ded8d0

Please sign in to comment.