diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 81154a72..b8a4ca6e 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,7 +5,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.4.3 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.4.4 secrets: inherit create-release: diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index 7af5045e..d129797e 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -37,9 +37,9 @@ jobs: - name: Get Reusable Script Files run: | - curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/.github/get_draft_release.sh - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/.github/sign_artifact.sh - curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/.github/upload_asset.sh + curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/.github/get_draft_release.sh + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/.github/sign_artifact.sh + curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/.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 @@ -103,7 +103,7 @@ jobs: - name: Get upload_zip.sh Script File if: inputs.zip == 'true' run: | - curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/.github/upload_zip.sh + curl -o $PWD/.github/upload_zip.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/.github/upload_zip.sh chmod +x $PWD/.github/upload_zip.sh - name: Attach Zip File to Draft Release diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index f8f6ae33..9f210e79 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -68,5 +68,5 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.3 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.4 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/os-extension-test.yml b/.github/workflows/os-extension-test.yml index 4b89f4ca..49b2dcae 100644 --- a/.github/workflows/os-extension-test.yml +++ b/.github/workflows/os-extension-test.yml @@ -98,5 +98,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.3 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.4 secrets: inherit diff --git a/.github/workflows/package-deb.yml b/.github/workflows/package-deb.yml index f1b5a439..4d34c56c 100644 --- a/.github/workflows/package-deb.yml +++ b/.github/workflows/package-deb.yml @@ -54,10 +54,10 @@ jobs: # Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/src/${{ inputs.artifactId }}/deb/control/control - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/src/${{ inputs.artifactId }}/deb/control/postinst - curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh - curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.4.3/.github/package-deb-pom.xml + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/src/${{ inputs.artifactId }}/deb/control/control + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/src/${{ inputs.artifactId }}/deb/control/postinst + curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh + curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.4.4/.github/package-deb-pom.xml - name: Set up Maven uses: stCarolas/setup-maven@v4.5 diff --git a/.github/workflows/pom-release-published.yml b/.github/workflows/pom-release-published.yml index 41377fb9..5ea84a91 100644 --- a/.github/workflows/pom-release-published.yml +++ b/.github/workflows/pom-release-published.yml @@ -68,5 +68,5 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.3 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.4 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 8c7236e7..0209be7a 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -204,5 +204,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.3 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.4 secrets: inherit diff --git a/.github/workflows/sonar-test-scan.yml b/.github/workflows/sonar-test-scan.yml index 69bfa9f2..b186d924 100644 --- a/.github/workflows/sonar-test-scan.yml +++ b/.github/workflows/sonar-test-scan.yml @@ -195,46 +195,49 @@ jobs: key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar + - name: Generate dump classes + run: | + mvn -B clean install surefire-report:report -P 'sonar,!run-proguard' "-Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT" + working-directory: ./${{ inputs.testedClassesModuleName }} + - name: Merge integration and unit tests reports if: always() run: | - mkdir ./liquibase-coverage/target - mv unit-tests/jacoco.exec ./liquibase-coverage/target/jacoco-unit.exec + mv unit-tests/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-unit.exec if [ -d "integration-tests/mssql" ]; then - mv integration-tests/mssql/jacoco.exec ./liquibase-coverage/target/jacoco-mssql-aggregate.exec + mv integration-tests/mssql/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-mssql-aggregate.exec fi if [ -d "integration-tests/mysql" ]; then - mv integration-tests/mysql/jacoco.exec ./liquibase-coverage/target/jacoco-mysql-aggregate.exec + mv integration-tests/mysql/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-mysql-aggregate.exec fi if [ -d "integration-tests/oracle" ]; then - mv integration-tests/oracle/jacoco.exec ./liquibase-coverage/target/jacoco-oracle-aggregate.exec + mv integration-tests/oracle/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-oracle-aggregate.exec fi if [ -d "integration-tests/postgresql" ]; then - mv integration-tests/postgresql/jacoco.exec ./liquibase-coverage/target/jacoco-postgresql-aggregate.exec + mv integration-tests/postgresql/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-postgresql-aggregate.exec fi if [ -d "integration-tests/h2" ]; then - mv integration-tests/h2/jacoco.exec ./liquibase-coverage/target/jacoco-h2-aggregate.exec + mv integration-tests/h2/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-h2-aggregate.exec fi if [ -d "integration-tests/hsqldb" ]; then - mv integration-tests/hsqldb/jacoco.exec ./liquibase-coverage/target/jacoco-hsqldb-aggregate.exec + mv integration-tests/hsqldb/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-hsqldb-aggregate.exec fi if [ -d "integration-tests/mariadb" ]; then - mv integration-tests/mariadb/jacoco.exec ./liquibase-coverage/target/jacoco-mariadb-aggregate.exec + mv integration-tests/mariadb/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-mariadb-aggregate.exec fi if [ -d "integration-tests/sqlite" ]; then - mv integration-tests/sqlite/jacoco.exec ./liquibase-coverage/target/jacoco-sqlite-aggregate.exec + mv integration-tests/sqlite/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-sqlite-aggregate.exec fi if [ -d "integration-tests/firebird" ]; then - mv integration-tests/firebird/jacoco.exec ./liquibase-coverage/target/jacoco-firebird-aggregate.exec + mv integration-tests/firebird/jacoco.exec ./${{ inputs.testedClassesModuleName }}/target/jacoco-firebird-aggregate.exec fi - - mvn -B verify -P '!run-proguard' -DskipITs -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT + wget -q https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip - unzip ./jacoco-0.8.10.zip - mv ./lib/jacococli.jar ./liquibase-coverage/target/jacococli.jar - chmod +x ./liquibase-coverage/target/jacococli.jar - cd liquibase-coverage + unzip -qq ./jacoco-0.8.10.zip + mv ./lib/jacococli.jar ./${{ inputs.testedClassesModuleName }}/target/jacococli.jar + chmod +x ./${{ inputs.testedClassesModuleName }}/target/jacococli.jar + cd ./${{ inputs.testedClassesModuleName }} mvn jacoco:merge@cli-merge-results cd ./target java -jar jacococli.jar report aggregate.exec --classfiles=../../${{ inputs.testedClassesModuleName }}/target/classdumps @@ -245,8 +248,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LIQUIBASE_PRO_LICENSE_KEY: ${{ secrets.PRO_LICENSE_KEY }} + working-directory: ./${{ inputs.testedClassesModuleName }} run: | - mvn -B verify sonar:sonar -P '!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT \ + mvn -B sonar:sonar -P 'sonar,!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT \ ${{ inputs.mavenArgs }} \ -Dsonar.scm.revision=${{ inputs.thisSha }} \ -Dsonar.token=$SONAR_TOKEN \ @@ -264,8 +268,9 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} LIQUIBASE_PRO_LICENSE_KEY: ${{ secrets.PRO_LICENSE_KEY }} + working-directory: ./${{ inputs.testedClassesModuleName }} run: | - mvn -B verify sonar:sonar -P '!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT \ + mvn -B sonar:sonar -P 'sonar,!run-proguard' -DskipTests -Dliquibase.version=${{ inputs.liquibaseBranchName }}-SNAPSHOT \ ${{ inputs.mavenArgs }} \ -Dsonar.scm.revision=${{ inputs.thisSha }} \ -Dsonar.token=$SONAR_TOKEN \