forked from aboutcode-org/scancode-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
116 lines (107 loc) · 4.02 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
language: python
python:
- 2.7.13
# Use a matrix of TEST_SUITE variables to distribute tests to several machines
# Use a global PYTEST variable to run all of the tests in a uniform fashion
# The --cov-report=term option displays coverage in CI logs
# The --cov-report=xml option is important for codecov.io
env:
global:
- PYTEST="bin/py.test -n 2 -vvs --cov=src --cov-report=term --cov-report=xml"
matrix:
- TEST_SUITE="$PYTEST --ignore=tests/scancode --ignore=tests/extractcode --ignore=tests/licensedcode --ignore=tests/cluecode --ignore=tests/packagedcode"
- TEST_SUITE="$PYTEST tests/scancode"
- TEST_SUITE="$PYTEST tests/extractcode"
- TEST_SUITE="$PYTEST tests/licensedcode --ignore=tests/licensedcode/test_zzzz_cache.py --ignore=tests/licensedcode/test_detection_datadriven.py"
- TEST_SUITE="$PYTEST tests/licensedcode/test_detection_datadriven.py"
- TEST_SUITE="$PYTEST tests/licensedcode/test_zzzz_cache.py"
- TEST_SUITE="$PYTEST tests/cluecode"
- TEST_SUITE="$PYTEST tests/packagedcode"
- TEST_SUITE="./etc/release/release.sh"
- TEST_SUITE="bin/about check thirdparty/"
- TEST_SUITE="bin/about check src/"
- TEST_SUITE="bin/about check etc/"
- TEST_SUITE="bin/about check plugins/"
# Travis does not offer OSX with arbitrary python versions (like 2.7.13 above)
# So, you can not simply have the following section in your build matrix:
# os:
# - linux
# - osx
# Instead, you have to include OSX entries into the build matrix manually.
# In particular, this means specifying the environment variables again.
# The following was adapted from here:
# https://docs.travis-ci.com/user/multi-os/
# Set TEST_SUITE in `env:` so that the `script:` section below works
# Set `language: generic` to clear `language: python` from above
# Set `python:` (to empty) to clear it from the travis-ci web interface
# Set `osx_image: xcode7.3` to pin OSX and Python versions, see here:
# https://docs.travis-ci.com/user/osx-ci-environment/
matrix:
include:
- os: osx
env: TEST_SUITE="$PYTEST --ignore=tests/scancode --ignore=tests/extractcode --ignore=tests/licensedcode --ignore=tests/cluecode --ignore=tests/packagedcode"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/scancode"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/extractcode"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/licensedcode --ignore=tests/licensedcode/test_zzzz_cache.py --ignore=tests/licensedcode/test_detection_datadriven.py"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/licensedcode/test_detection_datadriven.py"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/licensedcode/test_zzzz_cache.py"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/cluecode"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="$PYTEST tests/packagedcode"
language: generic
python:
osx_image: xcode7.3
- os: osx
env: TEST_SUITE="./etc/release/release.sh"
language: generic
python:
osx_image: xcode7.3
# TODO: ship pytest-cov and codecov with scancode-toolkit
install:
- ./configure
script:
# If debugging, use a subset of tests to wait less:
# - ./bin/py.test -n 2 -vvs --cov=src tests/scancode
# - echo $TEST_SUITE
- $TEST_SUITE
# Pay attention to both calls below. They will succeed even if there
# is no coverage information or connection to reporting website fails.
after_success:
- ./bin/codecov
notifications:
irc:
channels:
- "chat.freenode.net#aboutcode"
on_success: change
on_failure: always
use_notice: true
skip_join: true
template:
- "%{repository_slug}#%{build_number} (%{branch}-%{commit}:%{author})-%{message}- %{build_url}"