forked from python-microscopy/python-microscopy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_tests_36.sh
executable file
·50 lines (41 loc) · 1.03 KB
/
run_tests_36.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
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env bash
exit_code=0
#conda create -n pm_test_36 -y python=3.6 pyme-depends pytest pytest-cov pytest-html nose
#source activate pm_test_36
#python setup.py develop
#pytest -v --html=tests_py36.html .
#source deactivate
#conda env remove --name pm_test_36 -y
#conda create -n pm_test_36 -y -q python=3.6 pyme-depends pytest pytest-cov pytest-html nose
if [[ `conda env list` = *"pm_test_36"* ]]
then
echo "Using existing pm_test_36 environment"
else
conda create -n pm_test_36 -y -q python=3.6 pyme-depends pytest pytest-cov pytest-html nose
fi
if [ $? -eq 0 ]
then
source activate pm_test_36
if [ $? -eq 0 ]
then
python setup.py develop
if [ $? -eq 0 ]
then
cd tests
pytest -v --html=tests_py36.html
cd ..
else
exit_code=$?
fi
source deactivate
else
exit_code=$?
fi
#conda env remove --name pm_test_36 -y -q
else
exit $?
fi
if [ $exit_code -ne 0 ]
then
exit $exit_code
fi