-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
52 lines (41 loc) · 1.33 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
language: python
sudo: required
branches:
only:
- master
- package-setup
matrix:
include:
- os: osx
language: generic
env: TOXENV=py37
- os: osx
language: generic
env: TOXENV=py38
- os: linux
python: 3.7
- os: linux
python: 3.8
install:
# Install the appropriate miniconda depending on the os and miniconda version
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then MINICONDA_OS=Linux; else MINICONDA_OS=MacOSX; fi
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-$MINICONDA_OS-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p "$HOME"/miniconda
- source "$HOME"/miniconda/etc/profile.d/conda.sh
# set configs
- conda config --set always_yes yes --set changeps1 no
- conda config --add channels conda-forge
- conda config --set channel_priority strict
- conda config --add channels jrgarrahan # temporary lume-model fix
# log info for debugging
- conda info -a
# install conda build
- conda install conda-build
# create build & add to channel
- conda build -q conda-recipe --python=$TRAVIS_PYTHON_VERSION --output-folder bld-dir
- conda config --add channels "file://`pwd`/bld-dir"
# create env
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION --file dev-requirements.txt
- conda activate test-environment
script:
- pytest