Skip to content

Commit

Permalink
removed code that is no longer needed (added comment in issue #685 if…
Browse files Browse the repository at this point in the history
… this logic is desired in the future)
  • Loading branch information
georgemccabe committed Jul 7, 2022
1 parent dc82111 commit 69b0cce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
16 changes: 4 additions & 12 deletions .github/actions/run_tests/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ WS_PATH=$RUNNER_WORKSPACE/$REPO_NAME
# set CI jobs directory variable to easily move it
CI_JOBS_DIR=.github/jobs

PYTESTS_GROUPS_FILEPATH=.github/parm/pytest_groups.txt

source ${GITHUB_WORKSPACE}/${CI_JOBS_DIR}/bash_functions.sh

# get branch name for push or pull request events
Expand All @@ -30,9 +32,7 @@ if [ $? != 0 ]; then
${GITHUB_WORKSPACE}/${CI_JOBS_DIR}/docker_setup.sh
fi

#
# running unit tests (pytests)
#
if [[ "$INPUT_CATEGORIES" == pytests* ]]; then
export METPLUS_ENV_TAG="pytest"
export METPLUS_IMG_TAG=${branch_name}
Expand All @@ -55,16 +55,10 @@ if [[ "$INPUT_CATEGORIES" == pytests* ]]; then
-f .github/actions/run_tests/Dockerfile.run \
.

pytests_groups_filepath=.github/parm/pytest_groups.txt
# strip off pytests_ from marker string
#marker="$( cut -d '_' -f 2- <<< "$INPUT_CATEGORIES" )"
# remove underscore after 'not' and around 'or'
#marker="${marker//_or_/ or }"
#marker="${marker//not_/not }"
echo Running Pytests #marker=$marker
echo Running Pytests
command="export METPLUS_PYTEST_HOST=docker; cd internal_tests/pytests;"
command+="status=0;"
for x in `cat $pytests_groups_filepath`; do
for x in `cat $PYTESTS_GROUPS_FILEPATH`; do
marker="${x//_or_/ or }"
marker="${marker//not_/not }"
command+="/usr/local/envs/pytest/bin/pytest -vv --cov=../../metplus -m \"$marker\""
Expand All @@ -75,9 +69,7 @@ if [[ "$INPUT_CATEGORIES" == pytests* ]]; then
exit $?
fi

#
# running use case tests
#

# split apart use case category and subset list from input
CATEGORIES=`echo $INPUT_CATEGORIES | awk -F: '{print $1}'`
Expand Down
6 changes: 1 addition & 5 deletions .github/jobs/get_use_cases_to_run.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/bash

use_case_groups_filepath=.github/parm/use_case_groups.json
pytests_groups_filepath=.github/parm/pytest_groups.txt

# set matrix to string of an empty array in case no use cases will be run
matrix="[]"

Expand Down Expand Up @@ -32,10 +32,6 @@ fi
if [ "$run_unit_tests" == "true" ]; then
echo Adding unit tests to list to run

#pytests=""
#for x in `cat $pytests_groups_filepath`; do
# pytests=$pytests"\"pytests_$x\","
#done
pytests="\"pytests\","

# if matrix is empty, set to an array that only includes pytests
Expand Down

0 comments on commit 69b0cce

Please sign in to comment.