forked from LCA-ActivityBrowser/activity-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (65 loc) · 2.48 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
# Using https://github.com/Anaconda-Platform/anaconda-project/blob/master/.travis.yml as example
language: python
matrix:
include:
- python: "3.7"
os: linux
env: PYENV=3.7 VERSION=2.6.3.dev PKG_NAME=activity-browser-dev
- python: "3.8"
os: linux
env: PYENV=3.8 VERSION=2.6.3.dev PKG_NAME=activity-browser-dev
- python: "3.7"
language: generic
os: osx
env: PYENV=3.7 VERSION=2.6.3.dev PKG_NAME=activity-browser-dev
- python: "3.8"
language: generic
os: osx
env: PYENV=3.8 VERSION=2.6.3.dev PKG_NAME=activity-browser-dev
install:
# As suggested by https://github.com/conda/conda/issues/9337#issuecomment-542466141
- wget https://repo.anaconda.com/pkgs/misc/conda-execs/conda-latest-$TRAVIS_OS_NAME-64.exe -O conda.exe
- chmod +x conda.exe
- export CONDA_ALWAYS_YES=1
- ./conda.exe create -p $HOME/miniconda -c conda-forge python=$PYENV conda conda-build pytest pytest-qt pytest-mock coveralls coverage
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
# Useful for debugging any issues with conda
- conda info -a
# Build source into local package for testing
- conda build ./ci/travis/recipe --no-test
- conda install -q -c conda-forge -c cmutel -c file://$HOME/miniconda/conda-bld/ -c haasad -c pascallesage activity-browser-dev==$VERSION;
before_script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export DISPLAY=:99.0;
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX +render -noreset;
sleep 2;
fi
script:
# Run code coverage of the source code using all of the tests.
- coverage run --source=activity_browser -m pytest -v;
after_success:
# Only upload the code coverage from linux py37 machine
- if [ "$TRAVIS_OS_NAME" == "linux" -a "$PYENV" == "3.7" ]; then coveralls; fi
# https://docs.travis-ci.com/user/deployment/script/
# https://docs.travis-ci.com/user/deployment/#pull-requests
# Move deploy code from 'after_success' to 'deploy'
deploy:
- provider: script
skip_cleanup: true
script: bash ci/conda_upload.sh;
on:
branch: master
- provider: script
skip_cleanup: true
script: bash ci/conda_upload.sh;
on:
all_branches: true
tags: true
# Shouldn't need to have a lot of commit-history within the test
git:
depth: 3
notifications:
email:
on_success: always # default: change
on_failure: always # default: always