diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 4f813d1ded..0a80b7698a 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -42,3 +42,10 @@ jobs: # ensure this script is executed in the integration-tests directory working-directory: ./integration-tests run: bash ./run.sh + - name: Upload diff artifacts + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: integration-test-diffs + path: | + ./integration-tests/checkstyle-checkstyle-10.9.3-expected-changes.patch + ./integration-tests/checkstyle-checkstyle-10.9.3-expected-warnings.txt diff --git a/integration-tests/run.sh b/integration-tests/run.sh index 15018584ae..92468056cb 100755 --- a/integration-tests/run.sh +++ b/integration-tests/run.sh @@ -66,17 +66,18 @@ function apply_patch() { apply_patch "$(git diff | shasum --algorithm 256)" +# disable sync mechanism, we just want to upload the changes baseline_patch="../${project}-${revision}-expected-changes.patch" -if [ -n "${do_sync}" ]; then - echo 'Saving changes...' - git diff > "${baseline_patch}" -else - echo 'Inspecting changes...' - if ! diff -u "${baseline_patch}" <(git diff); then - echo 'There are unexpected changes.' - exit 1 - fi -fi +# if [ -n "${do_sync}" ]; then +echo 'Saving changes...' +git diff > "${baseline_patch}" +# else +# echo 'Inspecting changes...' +# if ! diff -u "${baseline_patch}" <(git diff); then +# echo 'There are unexpected changes.' +# exit 1 +# fi +# fi # Validate the results. # @@ -96,14 +97,15 @@ echo "Finished validation run!" baseline_warnings="../${project}-${revision}-expected-warnings.txt" # note: added '*' in the final grep, required in order to get matches in GNU grep 3.11 +# disable sync mechanism, we just want to upload the expected warnings generated_warnings="$(grep -oP "(?<=^\\Q[WARNING] ${PWD}/\\E).*" "${validation_log_file}" | grep -P '\]*\[')" -if [ -n "${do_sync}" ]; then - echo 'Saving emitted warnings...' - echo "${generated_warnings}" > "${baseline_warnings}" -else - echo 'Inspecting emitted warnings...' - if ! diff -u "${baseline_warnings}" <(echo "${generated_warnings}"); then - echo 'Diagnostics output changed.' - exit 1 - fi -fi +# if [ -n "${do_sync}" ]; then +echo 'Saving emitted warnings...' +echo "${generated_warnings}" > "${baseline_warnings}" +# else +# echo 'Inspecting emitted warnings...' +# if ! diff -u "${baseline_warnings}" <(echo "${generated_warnings}"); then +# echo 'Diagnostics output changed.' +# exit 1 +# fi +# fi