Skip to content

Commit 6f43a3d

Browse files
committed
jenkins.bash: Add support for Python 3 conformance testing
1 parent e67ce7c commit 6f43a3d

File tree

1 file changed

+27
-19
lines changed

1 file changed

+27
-19
lines changed

jenkins.bash

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,37 @@ cloneorpull() {
1414
}
1515
venv() {
1616
if ! test -d "$1" ; then
17-
virtualenv "$1"
17+
virtualenv -p python${PYTHON_VERSION} "$1"
1818
fi
1919
# shellcheck source=/dev/null
2020
source "$1"/bin/activate
2121
}
22-
git clean --force -d -x || /bin/true
23-
cloneorpull common-workflow-language https://github.com/common-workflow-language/common-workflow-language.git
24-
venv cwltool-venv
25-
docker pull node:slim
26-
export PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/
27-
pip install -U setuptools wheel pip
28-
python setup.py install
29-
pip install "cwltest>=1.0.20160825151655"
30-
pushd common-workflow-language
31-
git clean --force -d -x || /bin/true
32-
# shellcheck disable=SC2154
33-
if [[ "$version" = *dev* ]]
34-
then
35-
EXTRA="EXTRA=--enable-dev"
36-
fi
37-
./run_test.sh --junit-xml=result.xml RUNNER=cwltool -j4 DRAFT="${version}" ${EXTRA}
38-
CODE=$?
39-
popd
22+
23+
# Test for Python 2.7 and Python 3
24+
for PYTHON_VERSION in 2 3
25+
do
26+
git clean --force -d -x || /bin/true
27+
cloneorpull common-workflow-language https://github.com/common-workflow-language/common-workflow-language.git
28+
docker pull node:slim
29+
venv cwltool-venv
30+
export PIP_DOWNLOAD_CACHE=/var/lib/jenkins/pypi-cache/
31+
pip install -U setuptools wheel pip
32+
pip install .
33+
pip install "cwltest>=1.0.20160825151655"
34+
pushd common-workflow-language
35+
git clean --force -d -x || /bin/true
36+
# shellcheck disable=SC2154
37+
if [[ "$version" = *dev* ]]
38+
then
39+
EXTRA="EXTRA=--enable-dev"
40+
fi
41+
./run_test.sh --junit-xml=result.xml RUNNER=cwltool -j4 DRAFT=${version}
42+
deactivate
43+
CODE=$?
44+
popd
45+
done
46+
47+
# build new docker container
4048
if [ "$GIT_BRANCH" = "origin/master" ] && [[ "$version" = "v1.0" ]]
4149
then
4250
./build-cwl-docker.sh && docker push commonworkflowlanguage/cwltool_module && docker push commonworkflowlanguage/cwltool

0 commit comments

Comments
 (0)