suggestions

This commit is contained in:
Gijs de Jong
2024-01-10 11:03:13 +01:00
parent 3b2a0b4563
commit 713853dfe1
4 changed files with 7 additions and 6 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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"

View File

@@ -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.