forked from taskcluster/taskgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpin-helper.sh
executable file
·37 lines (31 loc) · 921 Bytes
/
pin-helper.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
#!/usr/bin/env bash
set -x
set -e
PIN_COMMAND='
set -e
pip install -q -U pip pip-compile-multi
pip-compile-multi -u \
-g base -g test -g dev -g docs
'
PIN_PYTHON=3.7
docker run -t -v $PWD:/src -w /src python:$PIN_PYTHON bash -c "${PIN_COMMAND}"
set +x
echo "###########################################################"
echo "# Running tests on different python versions #"
echo "# Pinned packages already saved. You may skip with CTRL+C #"
echo "###########################################################"
set -x
# Don't quit if a version fails
set +e
failed=0
for version in 3.7 3.8 3.9 3.10 3.11; do
docker run -t -v $PWD:/src -w /src python:$version bash -c "pip install -q -r requirements/dev.txt"
rt=$?
if [ $rt -gt 0 ]; then
failed=$rt
fi
done
if [ $failed -gt 0 ]; then
echo "Found errors testing different python versions, check the logs." 1>&2
fi
exit $failed