-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
29 lines (24 loc) · 884 Bytes
/
.travis.yml
File metadata and controls
29 lines (24 loc) · 884 Bytes
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
python:
- "3.6"
env:
global:
- CC_TEST_REPORTER_ID=a2a3e6dcf3fba0e0e5e1dc29e45c63413dab61df356289745179742a91755f9f
- DATABASE_URL="dbname='stackoverflow', host='localhost', user='postgres', password='password'"
services:
- postgresql
install:
- sudo pip install requests[security]
- sudo pip install -r requirements.txt
- sudo pip install coveralls
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- psql -c 'CREATE DATABASE stackoverflow;' -U postgres
script:
- sudo pytest -s -v
- sudo pytest --cov=app
- sudo coverage report -m
after_success:
- coverage xml
- sudo coveralls
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" < "3.7" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi