-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
55 lines (47 loc) · 1.62 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
language: generic
services:
- docker
matrix:
include:
- os: linux
dist: trusty
sudo: true
- os: osx
addons:
sonarcloud:
organization: "d53dave-github"
env:
global:
- BOTO_CONFIG=/dev/null # Fix "No module named google_compute_engine" on travis-ci
- CC_TEST_REPORTER_ID=57a2d5465c28a2de7f343c5c859259b2d5b473a6fee413edd1f4503dc911fe38
before_script:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > miniconda.sh;
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-darwin-amd64 > cc-test-reporter;
else
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh;
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > cc-test-reporter;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- chmod +x ./cc-test-reporter
- 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 env create --name csaopt-travisci -f environment.dev.yml
- source activate csaopt-travisci
- ./cc-test-reporter before-build
script: py.test --cov=csaopt -v tests
after_script:
- coverage xml
- |
if [[ "$TRAVIS_PULL_REQUEST" == "false" && $TRAVIS_OS_NAME == "linux" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT;
fi
after_success:
- |
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
coveralls; sonar-scanner;
fi