-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
34 lines (28 loc) · 973 Bytes
/
.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
language: python
python: "3.7.5"
os: linux
dist: xenial
env:
global:
- CC_TEST_REPORTER_ID=5eac50baf92d803ae86223c6f1d06612a690606c5f9b53c805312630a1a9c89f
# To override installing requirements always
install: pip --version
services:
- docker
before_install:
- sudo apt-get install -y curl
- mkdir shared
- sudo chmod -R a+rwx shared
- sudo chmod -R a+rwx .
- docker build . -t pyghost:v1.0
- 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
jobs:
include:
- name: PyTest With Coverage
script: docker run -ti -v "$PWD/shared:/shared" -v "$PWD:/app" pyghost:v1.0 bash -c "pytest --cov=./ --cov-report=xml:/shared/coverage.xml"
after_success:
- cp shared/coverage.xml coverage.xml
- curl -s https://codecov.io/bash | bash
- ./cc-test-reporter after-build -t coverage.py --exit-code $TRAVIS_TEST_RESULT