File: .travis.yml

package info (click to toggle)
imexam 0.9.1-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 26,868 kB
  • sloc: ansic: 13,995; python: 4,130; sh: 3,979; makefile: 485; tcl: 219; perl: 161
file content (121 lines) | stat: -rw-r--r-- 3,533 bytes parent folder | download | duplicates (3)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
language: python

os: linux
services: xvfb

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: false

# Cache can be cleared from the travis settings menu, see docs currently at
# https://docs.travis-ci.com/user/caching#Clearing-Caches
cache:
  - ccache

# The apt packages below are needed for sphinx builds, which can no longer
# be installed with sudo apt-get.
addons:
    apt:
        packages:
            - dvipng

env:
    global:
        # https://docs.travis-ci.com/user/environment-variables/        
        - CONDA_DEPENDENCIES='scipy matplotlib pyqt ginga ipython Cython setuptools_scm pip pytest'

        # PEP8 errors/warnings:
        # E101 - mix of tabs and spaces
        # W191 - use of tabs
        # W291 - trailing whitespace
        # W292 - no newline at end of file
        # W293 - trailing whitespace
        # W391 - blank line at end of file
        # E111 - 4 spaces per indentation level
        # E112 - 4 spaces per indentation level
        # E113 - 4 spaces per indentation level
        # E502 - the backslash is redundant between brackets
        # E722 - do not use bare except
        # E901 - SyntaxError or IndentationError
        # E902 - IOError
        - FLAKE8_OPT="--select=E101,W191,W291,W292,W293,E111,E112,E113,E502,E722,E901,E902"
    jobs:
        NUMPY=1.15
        NUMPY=1.16
        NUMPY=1.17
        NUMPY=1.18
        ASTROPY=4.0
        ASTROPY=3.2.3

before_install:
  # Install the latest version of Miniconda
  - uname -a
  - wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3.sh
  - chmod +x miniconda3.sh
  - ./miniconda3.sh -b
  - export PATH=/home/travis/miniconda3/bin:$PATH
  - conda config --add channels conda-forge
  - conda config --add channels astropy
  - python --version
  # travis clones submodules by default
  # - git submodule update --init --recursive

install:
    - conda create --yes -n test python=$PYTHON numpy=$NUMPY
    - source activate test
    - conda install -y  astropy=$ASTROPY
    - conda install -y $CONDA_DEPENDENCIES
    - pip install pytest-pep8 
    - pip install pytest-cov
    - pip install coveralls
    - pip install sphinx-automodapi
    - pip install photutils
    - pip install flake8
    - pip install sphinx-astropy
    - pip install graphviz
    - python setup.py build_ext --inplace

script: python setup.py test

jobs:

    # Don't wait for allowed failures
    fast_finish: true

    include:
        # Check for sphinx doc build warnings - we do this first because
        - name: "Test documentation build"
          env: NUMPY=1.17 PYTHON=3.7
          script: python setup.py build_sphinx

        # Try older numpy versions
        - python: 3.6
          env: NUMPY=1.15 ASTROPY=3.2.3
        - python: 3.6
          env: NUMPY=1.16 ASTROPY=4.0
        - python: 3.6
          env: NUMPY=1.17 ASTROPY=4.0
        - python: 3.7
          env: NUMPY=1.18 ASTROPY=4.0
        - python: 3.7
          env: NUMPY=1.17 ASTROPY=4.0
        - python: 3.8
          env: NUMPY=1.17 ASTROPY=4.0
        - python: 3.8
          env: NUMPY=1.18 ASTROPY=4.0
        

        # Do coverage tests
        - name: "Test coverage status"
          python: 3.7
          env: ASTROPY=4.0 NUMPY=1.17
          script: py.test --cov


        # Do a pep8 test
        - name: "Test pep8 requirements"
          env: PYTHON=3.7 ASTROPY=4.0 NUMPY=1.17
          script: flake8 imexam --count $FLAKE8_OPT


after_success:
    - coveralls --rcfile='imexam/tests/coveragerc'