abipy/.travis.yml

88 lines
2.8 KiB
YAML

language: python
#cache: true
# We don't actually use the Travis Python but conda
matrix:
include:
- os: linux
python: 2.7
env: ABINIT_VERSION=8.8.2
- os: linux
python: 3.6
env: ABINIT_VERSION=8.8.2
#dist: precise
sudo: false
install:
#- sudo apt-get update
- env
#- set -ev # exit on first error, print each command
# pip-based installation.
#- travis_wait pip install -r requirements.txt
#- travis_wait pip install -r requirements-optional.txt
# Install conda https://conda.io/docs/travis.html
- source dev_scripts/conda_get.sh
- source dev_scripts/conda_install.sh
- conda uninstall -y pymatgen
- if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mock; fi
#- pip install nose nose-exclude
#- pip install graphviz
# Mayavi (optional requirement)
#- if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mayavi; fi
#- if [[ "${TRAVIS_PYTHON_VERSION}" == "3.6" ]]; then conda install vtk && pip install mayavi; fi
# Use gmatteo's pymatgen fork
#- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && python setup.py install && cd ../
# Use pymatgen master
#- git clone --depth=50 https://github.com/materialsproject/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
- python setup.py install
- mkdir -p ${HOME}/.abinit/abipy
- cp abipy/data/managers/travis_scheduler.yml ${HOME}/.abinit/abipy/scheduler.yml
- cp abipy/data/managers/travis_manager.yml ${HOME}/.abinit/abipy/manager.yml
- ./dev_scripts/pyclean.py .
before_script:
# This to run tests requiring a graphical user e.g. mayavi
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
# https://github.com/travis-ci/travis-ci/issues/6307
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head; fi
#- rm abipy/gui/__init__.py
# command to run tests
script: ./dev_scripts/runtests.sh
branches:
only:
- master
- develop
after_success:
- if [[ "${TRAVIS_PYTHON_VERSION}" == "3.6" && "${TRAVIS_OS_NAME}" == "linux" ]]; then coveralls; fi
notifications:
email:
recipients:
- gmatteo@gmail.com
on_success: change
on_failure: always
# https://docs.travis-ci.com/user/deployment/pages/
#deploy:
# provider: pages
# skip_cleanup: true
# github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
# local_dir: ${TRAVIS_BUILD_DIR}/yourfolder
# on:
# branch: master