From f082c54aecb069f274af89cd755f813b8c659953 Mon Sep 17 00:00:00 2001 From: George McCabe <23407799+georgemccabe@users.noreply.github.com> Date: Thu, 2 Nov 2023 14:59:49 -0600 Subject: [PATCH] run diff for -ref branch run and only save output data artifacts if there are differences -- this should only update the truth data for use case groups that need to be updated --- .github/jobs/set_job_controls.sh | 1 + .github/workflows/testing.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/jobs/set_job_controls.sh b/.github/jobs/set_job_controls.sh index 032197ff46..8e4e91e341 100755 --- a/.github/jobs/set_job_controls.sh +++ b/.github/jobs/set_job_controls.sh @@ -33,6 +33,7 @@ elif [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then elif [ "${GITHUB_REF: -4}" == -ref ]; then run_all_use_cases=true run_save_truth_data=true + run_diff=true # if not pull request or -ref branch, apply commit messages overrides else diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e08aac81e4..65b56a1114 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -205,12 +205,12 @@ jobs: # copy output data to save as artifact - name: Save output data id: save-output - if: ${{ always() && steps.run_tests.conclusion != 'skipped' }} + if: ${{ always() && steps.run_tests.conclusion != 'skipped' && (!endsWith(needs.job_control.outputs.branch_name, '-ref') || steps.run-diff.conclusion == 'failure') }} run: .github/jobs/copy_output_to_artifact.sh ${{ steps.get-artifact-name.outputs.artifact_name }} - name: Upload output data artifact uses: actions/upload-artifact@v3 - if: ${{ always() && steps.run_tests.conclusion != 'skipped' }} + if: ${{ always() && steps.run_tests.conclusion != 'skipped' && (!endsWith(needs.job_control.outputs.branch_name, '-ref') || steps.run-diff.conclusion == 'failure') }} with: name: ${{ steps.get-artifact-name.outputs.artifact_name }} path: artifact/${{ steps.get-artifact-name.outputs.artifact_name }}