-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathvalidate.yml
34 lines (33 loc) · 1015 Bytes
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: 0.2
phases:
install:
commands:
- pip install "tox < 4.0"
runtime-versions:
python: latest
pre_build:
commands:
- git clone https://github.com/aws-samples/busy-engineers-document-bucket.git
- cd busy-engineers-document-bucket/exercises/python/encryption-context-complete
- sed -i "s/aws_encryption_sdk/aws_encryption_sdk==$VERSION/" requirements-dev.txt
- pyenv install --skip-existing 3.8.12
- pyenv local 3.8.12
- pip install "tox < 4.0"
build:
commands:
- NUM_RETRIES=3
- |
while [ $NUM_RETRIES -gt 0 ]
do
tox -re test
if [ $? -eq 0 ]; then
break
fi
NUM_RETRIES=$((NUM_RETRIES-1))
if [ $NUM_RETRIES -eq 0 ]; then
echo "All validation attempts failed, stopping"
exit 1;
else
echo "Validation failed, retrying in 60 seconds; will retry $NUM_RETRIES more times" && sleep 60
fi
done