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