From a3e20eba14d04f2268f96dc6d58959dcbb4ea3a7 Mon Sep 17 00:00:00 2001 From: Pey Lian Lim <2090236+pllim@users.noreply.github.com> Date: Wed, 5 Jun 2019 17:34:42 -0400 Subject: [PATCH] All the things to Azure --- .travis.yml | 105 -------------------------------------------- azure-pipelines.yml | 72 +++++++++++++++++++++++++++++- 2 files changed, 71 insertions(+), 106 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bfdb3d78..00000000 --- a/.travis.yml +++ /dev/null @@ -1,105 +0,0 @@ -# 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 - -compiler: gcc - -os: - - linux - -# Setting sudo to false opts in to Travis-CI container-based builds. -sudo: false - -# The apt packages below are needed for sphinx builds. A full list of packages -# that can be included can be found here: -# -# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise - -addons: - apt: - packages: - - graphviz - -env: - global: - # The following versions are the 'default' for tests, unless - # overridden underneath. They are defined here in order to save having - # to repeat them for all configurations. - - PYTHON_VERSION=3.7 - - NUMPY_VERSION=stable - - ASTROPY_VERSION=stable - - MAIN_CMD='python setup.py' - - SETUP_CMD='test' - - PIP_DEPENDENCIES='pytest-remotedata pytest-openfiles' - # For this package-template, we include examples of Cython modules, - # so Cython is required for testing. If your package does not include - # Cython code, you can set CONDA_DEPENDENCIES='' - - CONDA_DEPENDENCIES='Cython jinja2 scipy' - -matrix: - include: - - # Make sure that egg_info works without dependencies - - env: SETUP_CMD='egg_info' - - # Check for sphinx doc build warnings - we do this first because it - # may run for a long time - - env: PYTHON_VERSION=3.6 SETUP_CMD='build_docs -w' - - # Do a coverage test in Python 3. - - env: SETUP_CMD='test --coverage --open-files --remote-data' - PIP_DEPENDENCIES='codecov pytest-remotedata pytest-openfiles' - - # Do a test in older Python 3. - - env: PYTHON_VERSION=3.6 ASTROPY_VERSION=lts - SETUP_CMD='test --open-files' - - # Try Astropy development version - - env: ASTROPY_VERSION=development - - # Do a PEP8 test with flake8 - - env: MAIN_CMD='flake8 synphot --count' SETUP_CMD='' - -before_install: - - # If there are matplotlib tests, comment these out to - # Make sure that interactive matplotlib backends work - # - export DISPLAY=:99.0 - # - sh -e /etc/init.d/xvfb start - -install: - - # We now use the ci-helpers package to set up our testing environment. - # This is done by using Miniconda and then using conda and pip to install - # dependencies. Which dependencies are installed using conda and pip is - # determined by the CONDA_DEPDENDENCIES and PIP_DEPENDENCIES variables, - # which should be space-delimited lists of package names. See the README - # in https://github.com/astropy/ci-helpers for information about the full - # list of environment variables that can be used to customize your - # environment. In some cases, ci-helpers may not offer enough flexibility - # in how to install a package, in which case you can have additional - # commands in the install: section below. - - - git clone git://github.com/astropy/ci-helpers.git - - source ci-helpers/travis/setup_conda.sh - - # Upgrade to the latest version of pip to avoid it displaying warnings - # about it being out of date. - #- pip install --upgrade --no-deps pip - - # As described above, using ci-helpers, you should be able to set up an - # environment with dependencies installed using conda and pip, but in some - # cases this may not provide enough flexibility in how to install a - # specific dependency (and it will not be able to install non-Python - # dependencies). Therefore, you can also include commands below (as - # well as at the start of the install section or in the before_install - # section if they are needed before setting up conda) to install any - # other dependencies. - -script: - - $MAIN_CMD $SETUP_CMD - -after_success: - # Coverage report. - - if [[ $SETUP_CMD == *--coverage* ]]; then codecov; fi diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 171938be..9c4c86fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,7 +23,32 @@ jobs: python setup.py egg_info displayName: 'egg_info' -- job: 'NoRemoteData' +- job: 'Coverage' + pool: + vmImage: 'Ubuntu-16.04' + strategy: + matrix: + Python37: + python.version: '3.7' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: | + sudo apt-get install libxml2-utils + python -m pip install --upgrade pip setuptools + pip install numpy scipy astropy pytest-astropy codecov + python setup.py test --coverage --open-files --remote-data + displayName: 'Run tests' + + - script: codecov + displayName: 'Calculate coverage' + +- job: 'Default' pool: vmImage: 'Ubuntu-16.04' strategy: @@ -45,6 +70,51 @@ jobs: python setup.py test --open-files displayName: 'Run tests' +- job: 'Old_Astropy' + pool: + vmImage: 'Ubuntu-16.04' + strategy: + matrix: + Python36: + python.version: '3.6' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: | + sudo apt-get install libxml2-utils + python -m pip install --upgrade pip setuptools + pip install numpy scipy astropy>=2,<3 pytest-astropy + python setup.py test --open-files + displayName: 'Run tests' + +- job: 'Dev_Astropy' + pool: + vmImage: 'Ubuntu-16.04' + strategy: + matrix: + Python37: + python.version: '3.7' + maxParallel: 4 + + steps: + - task: UsePythonVersion@0 + inputs: + versionSpec: '$(python.version)' + architecture: 'x64' + + - script: | + sudo apt-get install libxml2-utils + python -m pip install --upgrade pip setuptools + pip install numpy scipy pytest-astropy + pip install git+https://github.com/astropy/astropy.git@master#egg=astropy + python setup.py test --open-files + displayName: 'Run tests' + - job: 'Windows' pool: vmImage: 'vs2017-win2016'