Skip to content

Commit

Permalink
add no-integration flag
Browse files Browse the repository at this point in the history
  • Loading branch information
elay committed Jun 12, 2024
1 parent 342a345 commit d2bdacc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion scripts/bin/test-funcs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ This scripts is meant to be run inside the funcs container.
"
}

while [[ $# -gt 0 ]]; do case $1 in
--no-integration)
INTEGRATION="--no-integration"
shift
;;
--help)
usage
exit 0
shift
;;
*)
usage "Unknown parameter passed: $1"
shift
shift
;;
esac done

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then

echo "Running mypy for funcs..."
Expand All @@ -27,6 +44,6 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
flake8 pcfuncs

echo "Running unit tests for funcs..."
python -m pytest pcfuncs/tests
python -m pytest pcfuncs/tests ${INTEGRATION:+$INTEGRATION}

fi
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
docker-compose \
-f docker-compose.yml \
run --rm \
funcs /bin/bash -c "cd /opt/src && scripts/bin/test-funcs"
funcs /bin/bash -c "cd /opt/src && scripts/bin/test-funcs ${NO_INTEGRATION}"
fi

fi

0 comments on commit d2bdacc

Please sign in to comment.