This repository was archived by the owner on Apr 28, 2019. It is now read-only.
forked from USF-COT/GSPS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
52 lines (45 loc) · 1.64 KB
/
.travis.yml
File metadata and controls
52 lines (45 loc) · 1.64 KB
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
51
52
language: python
python:
- "3.5"
sudo: required
services:
- docker
install:
# Install miniconda
# -----------------
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
# Setup conda
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no
- conda config --set show_channel_urls True
- conda config --add channels conda-forge
- conda config --add channels axiom-data-science
- conda update --quiet conda
# Create our environment
# ------------------------------------
- ENV_NAME='test'
- conda create --quiet -n $ENV_NAME python=$TRAVIS_PYTHON_VERSION
- source activate $ENV_NAME
# Install testing requirements
# ------------------------------------
- conda install --file requirements.txt pytest
- conda list --export
script:
- py.test -s -rxs -v
- conda install -n root conda-build anaconda-client
- conda build conda-recipe
- conda install gsps --use-local
after_success:
- export TAG=`if [ "$TRAVIS_TAG" == "" ]; then echo "latest"; else echo $TRAVIS_TAG ; fi`
- docker build -t axiom/gsps:$TAG .
- docker build -t axiom/gsps2nc:$TAG -f Dockerfile-gsps2nc .
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push axiom/gsps:$TAG;
docker push axiom/gsps2nc:$TAG;
fi
- if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TAG" != "latest" ]; then
anaconda -t $ANACONDA_TOKEN upload --force -u axiom-data-science $HOME/miniconda/**/*.tar.bz2;
fi