Skip to content

Commit

Permalink
Merge pull request #368 from cta-observatory/fix_travis
Browse files Browse the repository at this point in the history
Fix python versions on travis
  • Loading branch information
maxnoe committed Apr 23, 2020
2 parents 37c435c + c008c65 commit bb52a2e
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 13 deletions.
46 changes: 34 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
---
language: python

python:
- 3.6
- 3.7

env:
- CTAPIPE_VERSION="v0.7.0" CTAPIPE_IO_LST_VERSION="v0.4.1" PROTOZFITS_VERSION=v1.4.2
- CTAPIPE_VERSION="master" CTAPIPE_IO_LST_VERSION="master" PROTOZFITS_VERSION="master"
global:
- PYTHONIOENCODING=UTF8
- MPLBACKEND=Agg
- PYTEST_ADDOPTS='--color=yes'


matrix:
include:
- name: "python=3.6, ctapipe=0.7"
python: 3.6
env:
- CTAPIPE_VERSION="v0.7.0"
- CTAPIPE_IO_LST_VERSION="v0.4.1"

- name: "python=3.7, ctapipe=0.7"
python: 3.7
env:
- CTAPIPE_VERSION="v0.7.0"
- CTAPIPE_IO_LST_VERSION="v0.4.1"

- name: "python=3.6, ctapipe=master"
python: 3.6
env:
- CTAPIPE_VERSION="master"
- CTAPIPE_IO_LST_VERSION="master"

- name: "python=3.7, ctapipe=master"
python: 3.7
env:
- CTAPIPE_VERSION="master"
- CTAPIPE_IO_LST_VERSION="master"

allow_failures:
- env: CTAPIPE_VERSION="master" CTAPIPE_IO_LST_VERSION="master" PROTOZFITS_VERSION="master"
- name: "python=3.6, ctapipe=master"
- name: "python=3.7, ctapipe=master"


before_install:
# Use utf8 encoding. Should be default, but this is insurance
# against future changes
- export PYTHONIOENCODING=UTF8
- export MPLBACKEND=Agg

- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- . $HOME/miniconda/etc/profile.d/conda.sh
Expand All @@ -29,8 +49,10 @@ before_install:
- conda info -a # Useful for debugging any issues with conda

install:
- sed -i -e "s/- python=.*/- python=$TRAVIS_PYTHON_VERSION/g" environment.yml
- conda env create --file environment.yml
- conda activate lst-dev
- python --version
- |
pip install \
https://github.com/cta-observatory/ctapipe/archive/$CTAPIPE_VERSION.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ channels:
- cta-observatory
- conda-forge
dependencies:
- python=3.7
- pip
- ctapipe=0.7.0
- gammapy>=0.17
Expand All @@ -12,4 +13,3 @@ dependencies:
- pytest_runner
- pytest-ordering
- git+git://github.com/cta-observatory/[email protected]

3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ url=https://github.com/cta-observatory/cta-lstchain
long_description = file: README.md
long_description_content_type = text/markdown
github_project = cta-observatory/cta-lstchain

[options]
python_requires = >=3.6

0 comments on commit bb52a2e

Please sign in to comment.