-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (38 loc) · 1.01 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
language: python
sudo: true
# python versions to be tested
matrix:
include:
- python: 2.7
# - python: 3.5
- python: 3.6
# will still build pull requests
branches:
only:
- master
notifications:
email: false
services:
- mongodb
before_install:
# Get local information about the machine
- uname -a
- free -m
- df -h
- ulimit -a
- pip install -r requirements.txt
install:
# Install the library with test requirements
- pip install -e .[tests]
before_script:
- sleep 15 # fixes an issue with travis,
# MongoDB does not accept connections immediately.
- mongo test_db --eval ';' # --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'
- mongoimport --db test_db --collection software --type json --jsonArray --file tests/data/software.json
script:
- pytest -v --cov=./app
# with doctest to test examples in doctrings
# - pytest -v --doctest-modules --cov=./app
# if successful, track code coverage with codecov
after_success:
- codecov