-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from liquibase/dev
Merge dev into main
- Loading branch information
Showing
491 changed files
with
20,327 additions
and
1,615 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "*" ] | ||
|
||
jobs: | ||
build-test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: maven | ||
|
||
- name: Build with Maven | ||
run: mvn package --file liquibase-couchbase/pom.xml -DskipTests | ||
|
||
- name: Test with Maven | ||
run: mvn clean --file liquibase-couchbase/pom.xml org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report -Dskip.integration.tests=false | ||
|
||
- name: Test Report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() | ||
with: | ||
name: Test report | ||
path: liquibase-couchbase/target/surefire-reports/TEST-*.xml,liquibase-couchbase/target/failsafe-reports/TEST-*.xml | ||
reporter: java-junit | ||
|
||
# # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | ||
# - name: Update dependency graph | ||
# uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Attach Artifact to Release | ||
|
||
on: | ||
workflow_dispatch: | ||
secrets: | ||
BOT_TOKEN: | ||
description: 'BOT_TOKEN from the caller workflow' | ||
required: true | ||
GPG_SECRET: | ||
description: 'GPG_SECRET from the caller workflow' | ||
required: true | ||
GPG_PASSPHRASE: | ||
description: 'GPG_PASSPHRASE from the caller workflow' | ||
required: true | ||
|
||
jobs: | ||
attach-to-release: | ||
name: Attach Artifact to Release | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: sleep 30 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get Reusable Script Files | ||
run: | | ||
curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.1/.github/get_draft_release.sh | ||
curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.1/.github/sign_artifact.sh | ||
curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.1/.github/upload_asset.sh | ||
chmod +x $PWD/.github/get_draft_release.sh | ||
chmod +x $PWD/.github/sign_artifact.sh | ||
chmod +x $PWD/.github/upload_asset.sh | ||
- name: Get Artifact ID | ||
id: get-artifact-id | ||
run: echo "artifact_id=$(mvn --file liquibase-couchbase/pom.xml help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV | ||
|
||
- name: Download artifact | ||
id: download-artifact | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
github_token: ${{secrets.BOT_TOKEN}} | ||
workflow: test.yml | ||
pr: ${{github.event.pull_request.number}} | ||
name: ${{ env.artifact_id }}-artifacts | ||
path: ./assets | ||
repo: ${{ github.repository }} | ||
check_artifacts: true | ||
skip_unpack: false | ||
if_no_artifact_found: fail | ||
workflow_conclusion: "" | ||
|
||
- name: Get Release Tag | ||
id: get-release-tag | ||
run: echo "release_tag=$(./.github/get_draft_release.sh TAG)" >> $GITHUB_ENV | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
|
||
- name: Delete Outdated Files from Draft Release | ||
id: delete-outdated-release-asset | ||
uses: mknejp/delete-release-assets@v1 | ||
with: | ||
token: ${{ secrets.BOT_TOKEN }} | ||
tag: ${{ env.release_tag }} | ||
fail-if-no-assets: false | ||
fail-if-no-release: false | ||
assets: "${{ env.artifact_id }}-*" | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_SECRET }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
- name: Sign Files for Draft Release | ||
run: | | ||
gpg -K | ||
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}.jar | ||
./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}.pom | ||
./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}-javadoc.jar | ||
./.github/sign_artifact.sh ./assets/${{ env.artifact_id }}-${version}-sources.jar | ||
- name: Attach Files to Draft Release | ||
id: upload-release-asset | ||
run: ./.github/upload_asset.sh $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
ASSET_NAME_PREFIX: "${{ env.artifact_id }}-" | ||
ASSET_DIR: ./assets |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Create Release | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
create-release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create Release Draft | ||
id: create-release | ||
uses: release-drafter/release-drafter@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: Build and Test Extension | ||
|
||
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 --file liquibase-couchbase/pom.xml -B dependency:go-offline clean package -DskipTests=true | ||
|
||
- name: Get Artifact ID | ||
id: get-artifact-id | ||
run: echo "::set-output name=artifact_id::$(mvn --file liquibase-couchbase/pom.xml 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: liquibase-couchbase/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-and-it-test-ubuntu: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: [ 8, 11, 17, 18 ] | ||
os: [ ubuntu-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: liquibase-couchbase/target | ||
|
||
- name: Run Tests | ||
run: mvn --file liquibase-couchbase/pom.xml -B org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report "-Dskip.integration.tests=false" | ||
|
||
- 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 | ||
unit-test-windows: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java: [ 8, 11, 17, 18 ] | ||
os: [ 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: liquibase-couchbase/target | ||
|
||
- name: Run Tests | ||
run: mvn --file liquibase-couchbase/pom.xml -B org.jacoco:jacoco-maven-plugin:0.8.8:prepare-agent verify org.jacoco:jacoco-maven-plugin:0.8.8:report "-Dskip.integration.tests=true" | ||
|
||
- 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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Release Extension to Sonatype | ||
|
||
on: | ||
workflow_dispatch: | ||
release: | ||
types: [published] | ||
secrets: | ||
SONATYPE_USERNAME: | ||
description: 'SONATYPE_USERNAME from the caller workflow' | ||
required: true | ||
SONATYPE_TOKEN: | ||
description: 'SONATYPE_TOKEN from the caller workflow' | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Get Artifact ID | ||
id: get-artifact-id | ||
run: echo "artifact_id=$(mvn --file liquibase-couchbase/pom.xml help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> $GITHUB_ENV | ||
|
||
- name: Download Release Artifacts | ||
uses: robinraju/[email protected] | ||
with: | ||
tag: "${{ github.event.release.tag_name }}" | ||
filename: "${{ env.artifact_id }}-*" | ||
out-file-path: "." | ||
|
||
- name: Set up Java for publishing to Maven Central Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: sonatype-nexus-staging | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
|
||
# - name: Publish to Maven Central | ||
# env: | ||
# MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
# MAVEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN }} | ||
# run: | | ||
# version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
# mvn -B org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy-file \ | ||
# -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \ | ||
# -DrepositoryId=sonatype-nexus-staging \ | ||
# -DpomFile=${{ env.artifact_id }}-${version}.pom \ | ||
# -DgeneratePom=false \ | ||
# -Dfile=${{ env.artifact_id }}-${version}.jar \ | ||
# -Dsources=${{ env.artifact_id }}-${version}-sources.jar \ | ||
# -Djavadoc=${{ env.artifact_id }}-${version}-javadoc.jar \ | ||
# -Dfiles=${{ env.artifact_id }}-${version}.jar.asc,${{ env.artifact_id }}-${version}-sources.jar.asc,${{ env.artifact_id }}-${version}-javadoc.jar.asc,${{ env.artifact_id }}-${version}.pom.asc \ | ||
# -Dtypes=jar.asc,jar.asc,jar.asc,pom.asc \ | ||
# -Dclassifiers=,sources,javadoc, |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Liquibase Test Harness | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- dev | ||
- main | ||
|
||
jobs: | ||
liquibase-test-harness: | ||
name: Liquibase Test Harness | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
liquibase-support-level: [Foundational] # Define the different test levels to run | ||
fail-fast: false # Set fail-fast to false to run all test levels even if some of them fail | ||
|
||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Temurin Java 17 # Set up Java 17 with Temurin distribution and cache the Maven packages | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
cache: 'maven' | ||
|
||
- name: Build with Maven # Build the code with Maven (skip tests) | ||
run: mvn --file liquibase-couchbase/pom.xml -B -ntp -DskipTests=true package | ||
|
||
- name: Run ${{ matrix.liquibase-support-level }} Liquibase Test Harness # Run the Liquibase test harness at each test level | ||
continue-on-error: true # Continue to run the action even if the previous steps fail | ||
run: mvn --file liquibase-couchbase/pom.xml -ntp -Dtest=harness.** test | ||
|
||
- name: Test Reporter # Generate a test report using the Test Reporter action | ||
uses: dorny/[email protected] | ||
if: always() # Run the action even if the previous steps fail | ||
with: | ||
name: Liquibase Test Harness - ${{ matrix.liquibase-support-level }} Reports # Set the name of the test report | ||
path: liquibase-couchbase/target/surefire-reports/TEST-*.xml # Set the path to the test report files | ||
reporter: java-junit # Set the reporter to use | ||
fail-on-error: false # Set fail-on-error to false to show report even if it has failed tests |
Oops, something went wrong.