-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (52 loc) · 1.72 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
language: python
cache:
directories:
- "$HOME/.cache/pip"
- "$HOME/.pyenv"
- "$HOME/Library/Caches/Homebrew"
matrix:
include:
- os: linux
dist: xenial
sudo: false
python: '3.7'
env: UPLOAD_COV=true
- os: osx
language: objective-c
env: PYENV_VERSION=3.7.3
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install pyenv-virtualenv qt mpv; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cask install vlc; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; sudo apt-get install qt5-default mpv vlc xvfb -y; fi
install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
PYENV_ROOT="$HOME/.pyenv";
PATH="$PYENV_ROOT/bin:$PATH";
eval "$(pyenv init -)";
eval "$(pyenv virtualenv-init -)";
pyenv install -s $PYENV_VERSION;
pyenv virtualenv $PYENV_VERSION ene;
pyenv activate ene;
fi
- "make ci_setup"
before_script:
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "UPLOAD_COV" == "true" ]]; 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:
- make lint
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
make test;
elif [[ $UPLOAD_COV == "true" ]]; then
xvfb-run --server-args="-screen 0 1920x1080x24" make coverage;
else
xvfb-run --server-args="-screen 0 1920x1080x24" make test;
fi
after_script:
- coverage xml
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "UPLOAD_COV" == "true" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
notifications:
email: false