Skip to content

Commit

Permalink
Add shippable config
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-neal committed Aug 6, 2018
1 parent e183a34 commit 2182c7c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .shippable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
language: python
python:
- 2.7
- 3.5
- 3.6
- 3.7

before_install:
# http://conda.pydata.org/docs/travis.html
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
travis_retry wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
travis_retry wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda update -q conda
- conda info -a

cache:
directories:
- $HOME/.cache/pip

install:
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy astropy
- source activate test-environment

- travis_retry pip install -r requirements.txt
- travis_retry pip install -r requirements_dev.txt

- python setup.py install

build:
ci:
# Create folders for test and code coverage
- mkdir -p shippable/testresults
- mkdir -p shippable/codecoverage

# Run test and code coverage and output results to the right folder
- pytest --junitxml=shippable/testresults/nosetests.xml
- pytest --cov=. --cov-report=xml:shippable/codecoverage/coverage.xml --durations=10
# - pytest --cov=. --cov-report term-missing

after_success:
- coverage xml -i
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ install:
- python setup.py install

script:
- pytest --cov=spectrum_overload --cov-report term-missing --durations 10
- coverage xml
- pytest --cov=spectrum_overload --cov-report=term-missing --durations 10
- coverage xml -i

after_success:
- coveralls
Expand Down

0 comments on commit 2182c7c

Please sign in to comment.