3
3
set -e
4
4
set -x
5
5
6
+ export LC_ALL=C
7
+
6
8
package=cwltest
7
9
module=cwltest
8
10
slug=${TRAVIS_PULL_REQUEST_SLUG:= common-workflow-language/ ${module} }
9
11
repo=https://github.com/${slug} .git
10
12
run_tests=" bin/py.test --pyargs ${module} "
11
- pipver=18 # minimum required version of pip
12
- setupver=40.3 # minimum required version of setuptools
13
- PYVER=${PYVER:= 3}
13
+ pipver=20.3b1 # minimum required version of pip for Python 3.9
14
+ setuptoolsver=41.1.0 # required for Python 3.9
14
15
15
16
rm -Rf " testenv${PYVER} _" ? || /bin/true
16
17
17
18
export HEAD=${TRAVIS_PULL_REQUEST_SHA:- $(git rev-parse HEAD)}
18
19
19
20
if [ " ${RELEASE_SKIP} " != " head" ]
20
21
then
21
- virtualenv " testenv ${PYVER} _1 " -p " python ${PYVER} "
22
+ python3 -m venv testenv1
22
23
# First we test the head
23
24
# shellcheck source=/dev/null
24
- source " testenv${PYVER} _1/bin/activate"
25
- rm -f " testenv${PYVER} _1/lib/python-wheels/setuptools" *
26
- pip install --force-reinstall -U pip==${pipver}
27
- pip install setuptools==${setupver} wheel
25
+ source testenv1/bin/activate
26
+ rm -Rf testenv1/local
27
+ rm -f testenv1/lib/python-wheels/setuptools* \
28
+ && pip install --force-reinstall -U pip==${pipver} \
29
+ && pip install setuptools==${setuptoolsver} wheel
28
30
make install-dependencies
29
31
make test
30
32
pip uninstall -y ${package} || true ; pip uninstall -y ${package} \
31
33
|| true ; make install
32
- mkdir " testenv ${PYVER} _1 /not-${module} "
34
+ mkdir testenv1 /not-${module}
33
35
# if there is a subdir named '${module}' py.test will execute tests
34
36
# there instead of the installed module's tests
35
-
36
- pushd " testenv${PYVER} _1/not-${module} "
37
+ pushd testenv1/not-${module}
37
38
# shellcheck disable=SC2086
38
39
../${run_tests} ; popd
39
40
fi
40
41
41
-
42
- virtualenv " testenv${PYVER} _2" -p " python${PYVER} "
43
- virtualenv " testenv${PYVER} _3" -p " python${PYVER} "
44
- virtualenv " testenv${PYVER} _4" -p " python${PYVER} "
45
- virtualenv " testenv${PYVER} _5" -p " python${PYVER} "
46
-
42
+ python3 -m venv testenv2
43
+ python3 -m venv testenv3
44
+ python3 -m venv testenv4
45
+ python3 -m venv testenv5
46
+ rm -Rf testenv[2345]/local
47
47
48
48
# Secondly we test via pip
49
49
50
- pushd " testenv ${PYVER} _2 "
50
+ pushd testenv2
51
51
# shellcheck source=/dev/null
52
52
source bin/activate
53
- rm lib/python-wheels/setuptools* \
53
+ rm -f lib/python-wheels/setuptools* \
54
54
&& pip install --force-reinstall -U pip==${pipver} \
55
- && pip install setuptools==${setupver } wheel
55
+ && pip install setuptools==${setuptoolsver } wheel
56
56
# The following can fail if you haven't pushed your commits to ${repo}
57
57
pip install -e " git+${repo} @${HEAD} #egg=${package} "
58
58
pushd src/${package}
59
59
make install-dependencies
60
60
make dist
61
61
make test
62
- cp dist/${package} * tar.gz " ../../../testenv ${PYVER} _3/ "
63
- cp dist/${module} * whl " ../../../testenv ${PYVER} _4/ "
62
+ cp dist/${package} * tar.gz ../../../testenv3/
63
+ cp dist/${module} * whl ../../../testenv4/
64
64
pip uninstall -y ${package} || true ; pip uninstall -y ${package} || true ; make install
65
65
popd # ../.. no subdir named ${proj} here, safe for py.testing the installed module
66
66
# shellcheck disable=SC2086
67
67
${run_tests}
68
68
popd
69
69
70
- # Is the source distribution in testenv${PYVER}_2 complete enough to build
70
+ # Is the source distribution in testenv2 complete enough to build
71
71
# another functional distribution?
72
72
73
- pushd " testenv ${PYVER} _3/ "
73
+ pushd testenv3/
74
74
# shellcheck source=/dev/null
75
75
source bin/activate
76
- rm lib/python-wheels/setuptools* \
76
+ rm -f lib/python-wheels/setuptools* \
77
77
&& pip install --force-reinstall -U pip==${pipver} \
78
- && pip install setuptools==${setupver } wheel
78
+ && pip install setuptools==${setuptoolsver } wheel
79
79
pip install ${package} * tar.gz
80
80
pip install pytest\< 5
81
81
mkdir out
@@ -91,14 +91,14 @@ pushd ../not-${module}
91
91
popd
92
92
popd
93
93
94
- # Is the wheel in testenv${PYVER}_2 installable and will it pass the tests
94
+ # Is the wheel in testenv2 installable and will it pass the tests
95
95
96
- pushd " testenv ${PYVER} _4/ "
96
+ pushd testenv4/
97
97
# shellcheck source=/dev/null
98
98
source bin/activate
99
- rm lib/python-wheels/setuptools* \
99
+ rm -f lib/python-wheels/setuptools* \
100
100
&& pip install --force-reinstall -U pip==${pipver} \
101
- && pip install setuptools==${setupver } wheel
101
+ && pip install setuptools==${setuptoolsver } wheel
102
102
pip install ${module} * .whl
103
103
pip install pytest\< 5
104
104
mkdir not-${module}
0 commit comments