forked from agmangas/wot-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pytest-docker-all.sh
executable file
·41 lines (30 loc) · 842 Bytes
/
pytest-docker-all.sh
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
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -x
: ${PYTEST_ARGS:="-v --disable-warnings"}
PYTHON_TAG="2.7" PYTEST_ARGS=${PYTEST_ARGS} ./pytest-docker.sh
EXIT_27=$?
PYTHON_TAG="3.6" PYTEST_ARGS=${PYTEST_ARGS} ./pytest-docker.sh
EXIT_36=$?
PYTHON_TAG="3.7" PYTEST_ARGS=${PYTEST_ARGS} ./pytest-docker.sh
EXIT_37=$?
PYTHON_TAG="3.8" PYTEST_ARGS=${PYTEST_ARGS} ./pytest-docker.sh
EXIT_38=$?
PYTHON_TAG="3.9" PYTEST_ARGS=${PYTEST_ARGS} ./pytest-docker.sh
EXIT_39=$?
set +x
RED='\033[0;31m'
GREEN='\033[0;32m'
RESET='\033[0m'
print_section () {
if [[ $2 != 0 ]]
then
echo -e "$1 :: ${RED}Error${RESET}"
else
echo -e "$1 :: ${GREEN}OK${RESET}"
fi
}
print_section "Python 2.7" $EXIT_27
print_section "Python 3.6" $EXIT_36
print_section "Python 3.7" $EXIT_37
print_section "Python 3.8" $EXIT_38
print_section "Python 3.9" $EXIT_39