Skip to content

Commit 06de973

Browse files
committed
Add travis test for Anaconda Python 2.6.
Also run unit tests in an empty directory. This significantly speeds up codecov scan for test results.
1 parent 59d4849 commit 06de973

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.travis.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ os:
88
- osx
99

1010
env:
11-
global:
12-
- MYPYTHON_VERSION=2.7
13-
matrix:
14-
- MYUSEMC=true
15-
- MYUSEMC=false
11+
- MYUSEMC=true MYPYTHON_VERSION=2.6
12+
- MYUSEMC=true MYPYTHON_VERSION=2.7
13+
- MYUSEMC=false
1614

1715
matrix:
1816
exclude:
@@ -52,32 +50,32 @@ before_install:
5250
esac
5351

5452
- mkdir -p ~/pkgs/
53+
- mkdir -p ~/rundir/
5554

5655
- $NOMC || pushd ~/pkgs/
5756
- $NOMC || wget --timestamping ${MYMCREPO}/${MYMCBUNDLE}
5857
- $NOMC || test -x ~/mc/bin/conda || bash ${MYMCBUNDLE} -b -f -p ~/mc
5958
- $NOMC || popd
6059
- $NOMC || export PATH="${HOME}/mc/bin:${PATH}"
6160
- $NOMC || conda update --yes conda
62-
- $NOMC || conda install --yes python=${MYPYTHON_VERSION} conda-build jinja2
61+
- $NOMC || conda install --yes conda-build jinja2
6362
- $NOMC || conda create --name=testenv --yes python=${MYPYTHON_VERSION} coverage
64-
- $NOMC || conda config --add channels pavoljuhas/channel/dev
65-
- $NOMC || conda config --add channels pavoljuhas
63+
- $NOMC || conda config --add channels diffpy
6664

6765
- $NOAPT || test "${TRAVIS_OS_NAME}" = "linux" || exit $?
6866
- $NOAPT || devutils/makesdist
6967
- $NOAPT || MYTARBUNDLE="$(ls -t "${PWD}"/dist/*.tar.gz | head -1)"
7068

7169
install:
72-
- $NOMC || conda build conda-recipe
70+
- $NOMC || CONDA_PY=${MYPYTHON_VERSION} conda build conda-recipe
7371
- $NOMC || conda list --name=_test --export diffpy.structure > /tmp/mypackage.txt
7472
- $NOMC || source activate testenv
7573
- $NOMC || conda install --yes --use-local --file=/tmp/mypackage.txt
7674

7775
- $NOAPT || pip install $MYPIPFLAGS coverage
7876
- $NOAPT || easy_install --user "${MYTARBUNDLE}"
7977

80-
- cd
78+
- cd ~/rundir
8179
- MYGIT_REV=$(python -c "import diffpy.Structure.version as v; print(v.__gitsha__)")
8280
- if [[ "${TRAVIS_COMMIT}" != "${MYGIT_REV}" ]]; then
8381
echo "Version mismatch ${TRAVIS_COMMIT} vs ${MYGIT_REV}.";
@@ -89,4 +87,7 @@ script:
8987

9088
after_success:
9189
- pip install $MYPIPFLAGS codecov
90+
- $NOMC || if [[ "${MYPYTHON_VERSION}" == 2.6 ]]; then
91+
conda install --yes argparse;
92+
fi
9293
- codecov

0 commit comments

Comments
 (0)