forked from pbrod/numdifftools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
91 lines (86 loc) · 2.96 KB
/
.travis.yml
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
# Travis configuration file using the build matrix feature
# Read more under http://docs.travis-ci.com/user/build-configuration/
# and https://conda.io/docs/user-guide/tasks/use-conda-with-travis-ci.html
# THIS SCRIPT IS SUPPOSED TO BE AN EXAMPLE. MODIFY IT ACCORDING TO YOUR NEEDS!
dist: xenial
#sudo: required
addons:
sonarcloud:
organization: "pbrod"
token: "67bcbf1aefb992993fdd45b78fb4977a05be39b9"
code_climate:
repo_token: e5452096cdc930ddd2a4bec5c310cdb9b657484e049a2475ef0b5a347b9e5812
env:
global:
CC_TEST_REPORTER_ID=9c5d44592ed63ccd3c2b4aabf54fd9aee50f02e21cd016f67f4287e68f708dba
jdk:
- oraclejdk8
sudo: false
language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
- 3.5
- 3.6
- 3.7
matrix:
include:
- python: 3.8
sudo: true
services:
- xvfb
notifications:
email: false
# Setup anaconda
before_install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda install conda-build
- conda create -q -n condaenv python=$TRAVIS_PYTHON_VERSION
- conda install -n condaenv pip
- conda config --add channels conda-forge
- conda config --add channels https://conda.anaconda.org/qttesting
- source activate condaenv
# Install packages
install:
- conda install python=$TRAVIS_PYTHON_VERSION numpy scipy pytest statsmodels algopy pyqt matplotlib coverage pytest-cov pytest-pep8 line_profiler cython
- pip install setuptools
# codeclimate reporter is only compatible with Coverage.py versions >=4.0,<4.4.
- pip install codecov
- pip install hypothesis
- python setup.py install
# - conda build conda_recipe
# - conda install numdifftools --use-local
before_script:
- git fetch --unshallow --quiet
- git config --global user.email "[email protected]"
- git config --global user.name "pbrod"
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter;
chmod +x ./cc-test-reporter;
./cc-test-reporter before-build;
fi
script:
- coverage erase
- coverage run --source=numdifftools -m py.test build/lib
# see http://www.camillescott.org/2016/07/15/travis-pytest-scipyconf/
- coverage xml -o ./coverage-reports/coverage.xml
# - sed -i 's/filename="/filename=".\//g' coverage.xml
# - pylint numdifftools -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint-report.txt
after_script:
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
sonar-scanner -X;
./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
fi
after_success:
- codecov
cache:
- apt
cache:
directories:
- '$HOME/.sonar/cache'