forked from gwdetchar/gwdetchar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (51 loc) · 1.8 KB
/
.travis.yml
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
53
54
55
56
57
58
59
60
language: minimal
os: linux
env:
global:
- COVERAGE_STORAGE="json"
- CONDA_PKGS_DIRS="${HOME}/.cache/conda/pkgs"
matrix:
fast_finish: true
include:
# conda builds
- name: "conda:3.6"
env: PYTHON_VERSION="3.6"
- name: "conda:3.7"
env: PYTHON_VERSION="3.7"
- name: "conda:3.8"
env: PYTHON_VERSION="3.8"
- name: "conda:3.9"
env: PYTHON_VERSION="3.9"
before_install:
- curl -LO https://raw.githubusercontent.com/gwpy/gwpy/master/ci/parse-conda-requirements.py
- curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
- bash miniconda.sh -b -p ${HOME}/miniconda
- source "${HOME}/miniconda/etc/profile.d/conda.sh"
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- travis_retry conda update --quiet --yes conda
# Useful for debugging any issues with conda
- conda info --all
install:
# create a conda environment
- travis_retry conda create --quiet --yes --name gwdetcharci python=${PYTHON_VERSION} pip setuptools
- travis_retry conda activate gwdetcharci
- travis_retry python ./parse-conda-requirements.py requirements.txt -o conda-reqs.txt
- travis_retry conda install --quiet --yes --update-all --name gwdetcharci --file conda-reqs.txt
# clean up
- rm -f conda-reqs.txt parse-conda-requirements.py
script:
- python -m flake8 .
- python -m pytest --verbose --cov --pyargs gwdetchar
- bash ci/test-cli.sh
after_success:
- travis_retry conda install --quiet --yes --name gwdetcharci codecov
- python -m coverage report
- python -m codecov --flags $(uname) python${PYTHON_VERSION/./}
before_cache:
- travis_retry conda clean --quiet --yes --all
- rm -f $HOME/.cache/pip/log/debug.log
cache:
pip: true
directories:
- ${HOME}/.cache/conda/pkgs