diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index c38b444d..81bdd899 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -15,7 +15,7 @@ jobs: run-integration-tests: strategy: matrix: - integration-test: ["checkstyle.sh", "metrics-v4.2.19.sh"] + integration-test: ["checkstyle", "metrics-v4.2.19"] name: On-demand integration test if: | github.event.issue.pull_request && contains(github.event.comment.body, '/integration-test') @@ -43,12 +43,12 @@ jobs: - name: Install project to local Maven repository run: mvn -T1C install -DskipTests -Dverification.skip - name: Run integration test - run: xvfb-run ./integration-tests/${{ matrix.integration-test }} "${{ runner.temp }}/artifacts" + run: xvfb-run "./integration-tests/${{ matrix.integration-test }}.sh" "${{ runner.temp }}/artifacts" - name: Upload artifacts on failure if: ${{ failure() }} uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: - name: integration-test-checkstyle + name: "integration-test-${{ matrix.integration-test }}" path: "${{ runner.temp }}/artifacts" - name: Remove installed project artifacts run: mvn build-helper:remove-project-artifact diff --git a/integration-tests/checkstyle.sh b/integration-tests/checkstyle.sh index f489b75d..0d415543 100755 --- a/integration-tests/checkstyle.sh +++ b/integration-tests/checkstyle.sh @@ -19,4 +19,4 @@ build_flags="-Dassertj.version=3.24.2" validation_mvn_flags="-Dtest=!MetadataGeneratorUtilTest#metadataFilesGenerationAllFiles,!XdocsJavaDocsTest#allCheckSectionJavaDocs" additional_src_directories="\${project.basedir}\${file.separator}src\${file.separator}it\${file.separator}java,\${project.basedir}\${file.separator}src\${file.separator}xdocs-examples\${file.separator}java" -"$(dirname ${0})"/integration-test.sh "$test_name" "$project" "$repository" "$revision" "$build_flags" "$additional_src_directories" "" "" "$validation_mvn_flags" "$do_sync" "$report_directory" +"$(dirname ${0})"/run-integration-test.sh "$test_name" "$project" "$repository" "$revision" "$build_flags" "$additional_src_directories" "" "" "$validation_mvn_flags" "$do_sync" "$report_directory" diff --git a/integration-tests/metrics-v4.2.19.sh b/integration-tests/metrics-v4.2.19.sh index 4b121c99..1918e469 100755 --- a/integration-tests/metrics-v4.2.19.sh +++ b/integration-tests/metrics-v4.2.19.sh @@ -14,8 +14,8 @@ fi do_sync="$([ "${#}" = 0 ] || [ "${1:-}" != '--sync' ] || echo 1)" report_directory="$([ "${#}" = 0 ] || ([ -z "${do_sync}" ] && echo "${1}") || ([ "${#}" = 1 ] || echo "${2}"))" -# XXX: We exclude the CollectorMutability and the Immutable*|Preconditions*|StringRules.StringIsNullOrEmpty refaster rules +# XXX: We exclude the `CollectorMutability` and the `Immutable*|Preconditions*|StringRules.StringIsNullOrEmpty` refaster rules # as they introduce changes that expect guava to be on the classpath. patch_flags="-Xep:CollectorMutability:OFF -XepOpt:Refaster:NamePattern=^((?!(Immutable|Preconditions|StringRules\.StringIsNullOrEmpty)).*)" -"$(dirname ${0})"/integration-test.sh "$test_name" "$project" "$repository" "$revision" "" "" "${patch_flags}" "" "" "$do_sync" "$report_directory" +"$(dirname ${0})"/run-integration-test.sh "$test_name" "$project" "$repository" "$revision" "" "" "${patch_flags}" "" "" "$do_sync" "$report_directory" diff --git a/integration-tests/integration-test.sh b/integration-tests/run-integration-test.sh similarity index 99% rename from integration-tests/integration-test.sh rename to integration-tests/run-integration-test.sh index d9e73aa4..f02be091 100755 --- a/integration-tests/integration-test.sh +++ b/integration-tests/run-integration-test.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash + # This script is not meant to be invoked manually, instead it should be invoked # through one of the integration test scripts such as the metrics or checkstyle one.