Skip to content

Commit

Permalink
Added optional key/value to use_case_groups.json to prevent a use cas…
Browse files Browse the repository at this point in the history
…e group from running to easily disable it temporarily. Disable short_range:14 use case until it can be fixed with #2551
  • Loading branch information
georgemccabe committed Apr 12, 2024
1 parent 1d4fb14 commit 86874c5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/jobs/get_use_cases_to_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ if [ "$run_use_cases" == "true" ]; then
# if only running new use cases, add to filter criteria
if [ "$run_all_use_cases" == "false" ]; then
echo "Only run use cases that are marked to run every time (run = true)"
matrix=$(jq '[.[] | select(.run == true) | (.category + ":" + .index_list)]' $use_case_groups_filepath)
matrix=$(jq '[.[] | select(.run == true) | select(.disabled != true) | (.category + ":" + .index_list)]' $use_case_groups_filepath)
else
echo Add all available use cases
matrix=$(jq '[.[] | (.category + ":" + .index_list)]' $use_case_groups_filepath)
matrix=$(jq '[.[] | select(.disabled != true) | (.category + ":" + .index_list)]' $use_case_groups_filepath)
fi

fi
Expand Down
1 change: 1 addition & 0 deletions .github/parm/use_case_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@
{
"category": "short_range",
"index_list": "14",
"disabled": true,
"run": false
},
{
Expand Down
25 changes: 25 additions & 0 deletions docs/Contributors_Guide/continuous_integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,31 @@ to run. Example::
The above example will run data_assimilation 0, 1, 2, and 4 in one
job, then data_assimilation 3 in another job.

.. _cg-ci-disable_use_case:

Disabling Use Cases
"""""""""""""""""""

Sometimes use cases should not run in the automated test suite.
For example, changes to another repository may break a use case and prevent it
from running successfully until a fix can be applied.
In the meantime, to prevent the use case(s) from failing in the automated tests,
a use case group can be disabled by adding *"disabled": true* in
**use_case_groups.json**::

{
"category": "short_range",
"index_list": "14",
"disabled": true,
"run": true
},

It is recommended to add this key/value pair before the *run* key/value to avoid
having to add a comma to the end of the *run* value.

If the *disabled* value is set to *true*, then the use case group will not run
even if the *run* attribute is set to *true*.

Run Use Cases
^^^^^^^^^^^^^

Expand Down

0 comments on commit 86874c5

Please sign in to comment.