Skip to content

Commit fe45df1

Browse files
authored
Merge pull request #22 from common-workflow-language/release_test
add release test, MANIFEST.in, and fix Makefile
2 parents c66bb37 + 3ba6177 commit fe45df1

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include Makefile
2+
global-exclude *~
3+
global-exclude *.pyc

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ all:
4040
help: Makefile
4141
@sed -n 's/^##//p' $<
4242

43+
install-dependencies: install-dep
4344
## install-dep : install most of the development dependencies via pip
4445
install-dep:
4546
pip install --upgrade $(DEVPKGS)
@@ -134,7 +135,6 @@ diff-cover.html: coverage-gcovr.xml coverage.xml
134135

135136
## test : run the ${MODULE} test suite
136137
test: FORCE
137-
python tests/test_examples.py
138138

139139
sloccount.sc: ${PYSOURCES} Makefile
140140
sloccount --duplicates --wide --details $^ > sloccount.sc

release-test.sh

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
package=cwltest
7+
module=cwltest
8+
repo=https://github.com/common-workflow-language/cwltest.git
9+
run_tests="cwltest --help"
10+
pipver=8.0.1 # minimum required version of pip
11+
setupver=20.10.1 # minimum required version of setuptools
12+
13+
rm -Rf testenv? || /bin/true
14+
15+
export HEAD=`git rev-parse HEAD`
16+
virtualenv testenv1
17+
virtualenv testenv2
18+
virtualenv testenv3
19+
virtualenv testenv4
20+
21+
# First we test the head
22+
source testenv1/bin/activate
23+
rm testenv1/lib/python-wheels/setuptools* \
24+
&& pip install --force-reinstall -U pip==${pipver} \
25+
&& pip install setuptools==${setupver} wheel
26+
make install-dependencies
27+
make test
28+
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
29+
mkdir testenv1/not-${module}
30+
# if there is a subdir named '${module}' py.test will execute tests
31+
# there instead of the installed module's tests
32+
pushd testenv1/not-${module}; ../bin/${run_tests}; popd
33+
34+
35+
# Secondly we test via pip
36+
37+
cd testenv2
38+
source bin/activate
39+
rm lib/python-wheels/setuptools* \
40+
&& pip install --force-reinstall -U pip==${pipver} \
41+
&& pip install setuptools==${setupver} wheel
42+
pip install -e git+${repo}@${HEAD}#egg=${package}
43+
cd src/${package}
44+
make install-dependencies
45+
make dist
46+
make test
47+
cp dist/${package}*tar.gz ../../../testenv3/
48+
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
49+
cd ../.. # no subdir named ${proj} here, safe for py.testing the installed module
50+
bin/${run_tests}
51+
52+
# Is the distribution in testenv2 complete enough to build another
53+
# functional distribution?
54+
55+
cd ../testenv3/
56+
source bin/activate
57+
rm lib/python-wheels/setuptools* \
58+
&& pip install --force-reinstall -U pip==${pipver} \
59+
&& pip install setuptools==${setupver} wheel
60+
pip install ${package}*tar.gz
61+
pip install pytest
62+
mkdir out
63+
tar --extract --directory=out -z -f ${package}*.tar.gz
64+
cd out/${package}*
65+
make dist
66+
make test
67+
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
68+
mkdir ../not-${module}
69+
pushd ../not-${module} ; ../../bin/${run_tests}; popd

0 commit comments

Comments
 (0)