-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtravis.yml
More file actions
63 lines (55 loc) · 1.65 KB
/
travis.yml
File metadata and controls
63 lines (55 loc) · 1.65 KB
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
language: generic
dist: xenial
# run builds and tests on Linux and MacOS
os:
- linux
- osx
# ignore the virtualenv that Travis creates
# setup a secure login to CodeCov
# set env variables for different jobs
env:
# run build and test on two multiple versions of Python
matrix:
- PYENV_VERSION=3.7.3
- PYENV_VERSION=3.6.8
# configure all of the needed global variables
# note that the secure entries reference access tokens
# that support secure access to remote services
global:
- PYENV_ROOT=$HOME/.travis-pyenv
- PIPENV_VENV_IN_PROJECT=1
- PIPENV_IGNORE_VIRTUALENVS=1
- LANG=en_US.UTF-8
- LC_ALL=en_US.UTF-8
# install pyenv with travis-pyenv
before_install:
- wget https://github.com/praekeltfoundation/travis-pyenv/releases/latest/download/setup-pyenv.sh
- source setup-pyenv.sh
# command to install dependencies (from Pipfile, not Pipfile.lock)
# cannot use locked dependencies because of possible version changes
# between PYENV_VERSION versions
install:
- pip install --upgrade pip
- pip install --upgrade pipenv
- pipenv install --dev --skip-lock --python "$PYENV_VERSION"
- gem install mdl
# send emails when there is a change or failure
notifications:
email:
on_success: change
on_failure: always
# use a cache to improve performance
# cache pip installations
# cache pyenv installations
cache:
directories:
- $HOME/.pyenv_cache
- $HOME/.cache/pip
# perform testing:
# --> run the test suite and generate coverage with Pipfile script
# --> lint the code with Pipfile script
# --> lint the README documentation with mdl
script:
# - pipenv run cover
# - pipenv run lint --check
- mdl README.md