-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (47 loc) · 1.74 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
49
language: python
# If you want to give names to different jobs, use the format right below.
# For multiple jobs, place under include a - name, python and env options (only name has a "-" right before.
# https://docs.travis-ci.com/user/customizing-the-build/#naming-jobs-within-matrices
jobs:
include:
- name: "Unit Tests"
python: "3.8"
# env: TEST_SUITE=<name_of_suite>
# This allows to get build results as soon all jobs that are NOT allowed to fail finish.
fast_finish: true
# This in case I want to allow a build to fail for some reason
# https://docs.travis-ci.com/user/customizing-the-build/#jobs-that-are-allowed-to-fail
# allow_failures:
# - python: 3.8
# if: branch = <branch_name>
python:
- 3.8
before_install:
- "python setup.py install"
install:
- pip install -r requirements.txt
- pip install codecov
- pip install pytest-cov
# - pip install -e ./src/freed # Workaround to make coverage.py generate reports. Might not be needed anymore
script:
- python -m pytest # This places current directory in sys.path. Running pytest alone does not -> ModuleNotFoundError
- python -m pytest --cov=./
#Note: Caching is for language-specific dependencies. Large files that are slow to download do not benefit from caching.
#Do NOT store sensitive data in cache because cache is available to ALL builds.
#cache: pip
# directories:
git:
depth: false
#git:
# quiet: true
#This is in case rates are limited or if the project needs to use Git Large File Storage
#https://docs.travis-ci.com/user/customizing-the-build/#git-lfs:
#before_install:
# - echo -e "machine github.com\n login $GITHUB_TOKEN" > ~/.netrc
# - git lfs pull
branches:
only:
- master
- /dev-.*/
after_success:
- bash <(curl -s https://codecov.io/bash)