This repository was archived by the owner on Jul 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
38 lines (30 loc) · 1.29 KB
/
.travis.yml
File metadata and controls
38 lines (30 loc) · 1.29 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
dist: xenial # required for Python >= 3.7
language: python
python:
- "3.6"
- "3.7"
env:
global:
- CC_TEST_REPORTER_ID=44d834637557f78627da2973e1169fb8729bd587fd07b3bbe15571aa850ee957
install:
- "pip install pytest"
- "pip install pytest-cov" #This plugin produces coverage reports
- "pip install codecov" #install codecov
- "pip install codacy-coverage" # Install codacy-coverage
- "pip install -r requirements.txt" # Needed mainly for making Allure work
before_script: # code coverage tool
- 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
script:
- pytest --cov-config=.coveragerc --cov-report term-missing --cov # check test coverage with pytest-cov
after_script:
- coverage xml
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_PYTHON_VERSION" == "3.7" ]]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi
after_success:
# Generates coverage report, public repo using Travis:
# Source: https://dev.to/j0nimost/using-codecov-with-travis-ci-pytest-cov-1dfj
- codecov
# python codacy coverage
# Source: https://github.com/codacy/python-codacy-coverage
- python-codacy-coverage -r coverage.xml