@@ -19,8 +19,8 @@ pip freeze --all | tee pip_freeze_after_test.txt
19
19
( diff pip_freeze_before.txt pip_freeze_after.txt || : ) | tee pip_freeze_diff.txt
20
20
( diff pip_freeze_after.txt pip_freeze_after_test.txt || : ) | tee pip_freeze_diff_test.txt
21
21
# Scanning sources
22
- bandit -r ./sagemaker_ssh_helper/ ./tests/ * .py --skip B603,B404,B101 2>&1 | tee bandit.txt
23
- flake8 --extend-ignore E501,F401,F541,E402 ./sagemaker_ssh_helper/ ./tests/ * .py | tee flake8.txt
22
+ bandit -r ./sagemaker_ssh_helper/ ./tests/ ./ * .py --skip B603,B404,B101 2>&1 | tee bandit.txt
23
+ flake8 --extend-ignore E501,F401,F541,E402 ./sagemaker_ssh_helper/ ./tests/ ./ * .py | tee flake8.txt
24
24
# Configure local env
25
25
id
26
26
apt-get update
@@ -40,11 +40,11 @@ cdk bootstrap aws://"$ACCOUNT_ID"/"$REGION" \
40
40
--require-approval never
41
41
APP=" python -m sagemaker_ssh_helper.cdk.tests_app"
42
42
AWS_REGION=$REGION cdk -a " $APP " deploy SSH-IAM-SSM-Stack-Tests \
43
- -c sagemaker_role=$SAGEMAKER_ROLE -c user_role=$USER_ROLE \
43
+ -c sagemaker_role=" $SAGEMAKER_ROLE " -c user_role=" $USER_ROLE " \
44
44
--require-approval never
45
45
APP=" python -m sagemaker_ssh_helper.cdk.iam_ssm_app"
46
46
AWS_REGION=$REGION cdk -a " $APP " deploy SSH-IAM-SSM-Stack \
47
- -c sagemaker_role=$SAGEMAKER_ROLE -c user_role=$USER_ROLE \
47
+ -c sagemaker_role=" $SAGEMAKER_ROLE " -c user_role=" $USER_ROLE " \
48
48
--require-approval never
49
49
APP=" python -m sagemaker_ssh_helper.cdk.advanced_tier_app"
50
50
AWS_REGION=$REGION cdk -a " $APP " deploy SSM-Advanced-Tier-Stack \
@@ -82,11 +82,12 @@ export AWS_SESSION_TOKEN=${sts[2]}
82
82
# Run tests
83
83
echo " Extra args for pytest - $PYTEST_EXTRA_ARGS "
84
84
cd tests
85
+ # shellcheck disable=SC2086
85
86
coverage run -m pytest \
86
87
--html=pytest_report.html --self-contained-html --junitxml=pytest_report.xml \
87
88
-m ' not manual' \
88
- -o sagemaker_studio_domain=$SAGEMAKER_STUDIO_DOMAIN \
89
- -o sns_notification_topic_arn=$SNS_NOTIFICATION_TOPIC_ARN \
89
+ -o sagemaker_studio_domain=" $SAGEMAKER_STUDIO_DOMAIN " \
90
+ -o sns_notification_topic_arn=" $SNS_NOTIFICATION_TOPIC_ARN " \
90
91
$PYTEST_EXTRA_ARGS || EXIT_CODE=$?
91
92
coverage report
92
93
coverage xml
0 commit comments