File: .travis.yml

package info (click to toggle)
aplpy 2.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,344 kB
  • sloc: python: 7,175; makefile: 116; ansic: 88
file content (120 lines) | stat: -rw-r--r-- 4,228 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
# We set the language to c because python isn't supported on the MacOS X nodes
# on Travis. However, the language ends up being irrelevant anyway, since we
# install Python ourselves using conda.
language: c

os:
    - osx
    - linux

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

env:
  matrix:
    - PYTHON_VERSION=3.5
    - PYTHON_VERSION=3.6
    - PYTHON_VERSION=3.7 SETUPTOOLS_VERSION=dev DEBUG=True
      CONDA_DEPENDENCIES='sphinx cython numpy pytest-cov'
      EVENT_TYPE='push pull_request cron'


  global:
    - CONDA_DEPENDENCIES="setuptools sphinx cython numpy pytest-cov"
    - PIP_DEPENDENCIES="codecov"
    - EVENT_TYPE='push pull_request'

matrix:
  include:
    # Do one build with sphinx-astropy as one of the tests bypasses the auto-
    # installation but we want to make sure that test runs for coverage.
    - os: linux
      env: PYTHON_VERSION=3.6 PIP_DEPENDENCIES='codecov sphinx-astropy'
    - os: linux
      env: PYTHON_VERSION=3.6 SPHINX_VERSION='1.5' SETUPTOOLS_VERSION=27
    - os: linux
      env: PYTHON_VERSION=3.5 SPHINX_VERSION='1.4' SETUPTOOLS_VERSION=27
    - os: linux
      env: PYTHON_VERSION=3.6 PIP_DEPENDENCIES='git+https://github.com/sphinx-doc/sphinx.git#egg=sphinx codecov'
           CONDA_DEPENDENCIES="setuptools cython numpy pytest-cov"
    # Test without installing numpy beforehand to make sure everything works
    # without assuming numpy is already installed
    - os: linux
      env: PYTHON_VERSION=3.6 CONDA_DEPENDENCIES='sphinx cython pytest-cov'

    # Test conda's clang
    - os: osx
      env:
        - PYTHON_VERSION=3.5
        - CONDA_DEPENDENCIES="setuptools sphinx cython numpy pytest-cov clang llvm-openmp"
        - OPENMP_EXPECTED=True
        - CCOMPILER=clang

    # Test gcc on OSX
    - os: osx
      env:
        - PYTHON_VERSION=3.5
        - CONDA_DEPENDENCIES="setuptools sphinx cython numpy pytest-cov gcc"
        - OPENMP_EXPECTED=True
        - CCOMPILER=gcc

  # Uncomment the following if there are issues in setuptools that we
  # can't work around quickly - otherwise leave uncommented so that
  # we notice when things go wrong.
  #
  # allow_failures:
  #   - env: PYTHON_VERSION=3.6 SETUPTOOLS_VERSION=dev DEBUG=True
  #          CONDA_DEPENDENCIES='sphinx cython numpy pytest-cov'
  #          EVENT_TYPE='push pull_request cron'

before_install:

      # Test OSX without OpenMP support
      # Since the matrix OSX tests use the OS shipped version of clang, they double up
      # as exploratory tests for when the shipped version has automatic OpenMP support.
      # These tests will then fail and at such a time a new one should be added
      # to explicitly remove OpenMP support.
    - if [ -z $OPENMP_EXPECTED ]; then
        if [[ $TRAVIS_OS_NAME == osx ]]; then
          export OPENMP_EXPECTED=False;
        else
          export OPENMP_EXPECTED=True;
        fi
      fi

    # We need to use CCOMPILER otherwise Travis overwrites CC if we define it
    # in env: above.
    - if [ ! -z $CCOMPILER ]; then
        export CC=$CCOMPILER;
      fi

    # Check CC variable
    - echo $CC

install:

    - git clone git://github.com/astropy/ci-helpers.git
    - source ci-helpers/travis/setup_conda.sh

    # We cannot install the developer version of setuptools using pip because
    # pip tries to remove the previous version of setuptools before the
    # installation is complete, which causes issues. Instead, we just install
    # setuptools manually.
    - if [[ $SETUPTOOLS_VERSION == dev ]]; then git clone http://github.com/pypa/setuptools.git; cd setuptools; python bootstrap.py; python setup.py install; cd ..; fi

before_script:
    # Some of the tests use git commands that require a user to be configured
    - git config --global user.name "A U Thor"
    - git config --global user.email "author@example.com"

script:
    - py.test --cov astropy_helpers astropy_helpers

    # In conftest.py we produce a .coverage.subprocess that contains coverage
    # statistics for sub-processes, so we combine it with the main one here.
    - mv .coverage .coverage.main
    - coverage combine .coverage.main .coverage.subprocess
    - coverage report

after_success:
    - codecov