Skip to content

Commit

Permalink
Per #2856, update the testing.yml workflow dispatch option to let the…
Browse files Browse the repository at this point in the history
… comparison branch be manually defined.
  • Loading branch information
JohnHalleyGotway committed Jun 17, 2024
1 parent 99b6bb3 commit 0ae224f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/jobs/set_job_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,15 @@ elif [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then
run_diff=true
fi

truth_data_version=${force_compare_branch}

# if main_vX.Y branch, use X.Y input data
if [ "${force_ref_branch:0:6}" == "main_v" ]; then
input_data_version=${force_compare_branch:6}
else
input_data_version=${force_compare_branch}
fi

fi

# if updating truth or running diff, run unit tests
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ on:
inputs:
force_tests:
description: 'Run the unit tests'
default: true
type: boolean
default: true
force_compare_branch:
description: 'Branch name for input data and output comparison'
type: string
default: develop
required: true

env:
DOCKERHUB_REPO: dtcenter/met-dev
Expand All @@ -57,6 +62,7 @@ jobs:
env:
commit_msg: ${{ github.event.head_commit.message }}
force_tests: ${{ github.event.inputs.force_tests }}
force_compare_branch: ${{ github.event.inputs.force_compare_branch }}

outputs:
run_compile: ${{ steps.job_status.outputs.run_compile }}
Expand Down

0 comments on commit 0ae224f

Please sign in to comment.