Skip to content

Commit 7a4029f

Browse files
committed
Add ci for examples.
1 parent 4df84b9 commit 7a4029f

File tree

4 files changed

+87
-34
lines changed

4 files changed

+87
-34
lines changed

.travis.yml

+63-25
Original file line numberDiff line numberDiff line change
@@ -5,74 +5,112 @@ env:
55
global:
66
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
77
- SEGFAULT_SIGNALS=all
8-
matrix:
9-
- TOXENV=check
10-
- TOXENV=docs
11-
matrix:
8+
stages:
9+
- lint
10+
- examples
11+
- tests
12+
jobs:
1213
include:
13-
- python: '2.7'
14+
- stage: lint
15+
env:
16+
- TOXENV=check
17+
- stage: lint
18+
env:
19+
- TOXENV=docs
20+
- stage: tests
21+
python: '2.7'
1422
env:
1523
- TOXENV=py27-t310-c45
16-
- python: '2.7'
24+
- stage: tests
25+
python: '2.7'
1726
env:
1827
- TOXENV=py27-t40-c45
19-
- python: '2.7'
28+
- stage: tests
29+
python: '2.7'
2030
env:
2131
- TOXENV=py27-t41-c45
22-
- python: '3.4'
32+
- stage: tests
33+
python: '3.4'
2334
env:
2435
- TOXENV=py34-t310-c45
25-
- python: '3.4'
36+
- stage: tests
37+
python: '3.4'
2638
env:
2739
- TOXENV=py34-t40-c45
28-
- python: '3.4'
40+
- stage: tests
41+
python: '3.4'
2942
env:
3043
- TOXENV=py34-t41-c45
31-
- python: '3.5'
44+
- stage: tests
45+
python: '3.5'
3246
env:
3347
- TOXENV=py35-t310-c45
34-
- python: '3.5'
48+
- stage: tests
49+
python: '3.5'
3550
env:
3651
- TOXENV=py35-t40-c45
37-
- python: '3.5'
52+
- stage: tests
53+
python: '3.5'
3854
env:
3955
- TOXENV=py35-t41-c45
40-
- python: '3.6'
56+
- stage: tests
57+
python: '3.6'
4158
env:
4259
- TOXENV=py36-t310-c45
43-
- python: '3.6'
60+
- stage: tests
61+
python: '3.6'
4462
env:
4563
- TOXENV=py36-t40-c45
46-
- python: '3.6'
64+
- stage: tests
65+
python: '3.6'
4766
env:
4867
- TOXENV=py36-t41-c45
49-
- python: '3.7'
68+
- stage: tests
69+
python: '3.7'
5070
env:
5171
- TOXENV=py37-t310-c45
52-
- python: '3.7'
72+
- stage: tests
73+
python: '3.7'
5374
env:
5475
- TOXENV=py37-t40-c45
55-
- python: '3.7'
76+
- stage: tests
77+
python: '3.7'
5678
env:
5779
- TOXENV=py37-t41-c45
58-
- python: 'pypy2.7-6.0'
80+
- stage: tests
81+
python: 'pypy2.7-6.0'
5982
env:
6083
- TOXENV=pypy-t310-c45
61-
- python: 'pypy2.7-6.0'
84+
- stage: tests
85+
python: 'pypy2.7-6.0'
6286
env:
6387
- TOXENV=pypy-t40-c45
64-
- python: 'pypy2.7-6.0'
88+
- stage: tests
89+
python: 'pypy2.7-6.0'
6590
env:
6691
- TOXENV=pypy-t41-c45
67-
- python: 'pypy3.5-6.0'
92+
- stage: tests
93+
python: 'pypy3.5-6.0'
6894
env:
6995
- TOXENV=pypy3-t310-c45
70-
- python: 'pypy3.5-6.0'
96+
- stage: tests
97+
python: 'pypy3.5-6.0'
7198
env:
7299
- TOXENV=pypy3-t40-c45
73-
- python: 'pypy3.5-6.0'
100+
- stage: tests
101+
python: 'pypy3.5-6.0'
74102
env:
75103
- TOXENV=pypy3-t41-c45
104+
- stage: examples
105+
python: '3.6'
106+
script: >
107+
cd examples/src-layout
108+
tox
109+
- stage: examples
110+
python: '3.6'
111+
script: >
112+
cd examples/adhoc-layout
113+
tox
76114
before_install:
77115
- python --version
78116
- uname -a

ci/templates/.travis.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,37 @@ env:
55
global:
66
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
77
- SEGFAULT_SIGNALS=all
8-
matrix:
9-
- TOXENV=check
10-
- TOXENV=docs
11-
matrix:
8+
stages:
9+
- lint
10+
- examples
11+
- tests
12+
jobs:
1213
include:
14+
- stage: lint
15+
env:
16+
- TOXENV=check
17+
- stage: lint
18+
env:
19+
- TOXENV=docs
1320
{%- for env in tox_environments %}{{ '' }}
21+
- stage: tests
1422
{% if env.startswith("pypy-") %}
15-
- python: 'pypy2.7-6.0'
23+
python: 'pypy2.7-6.0'
1624
{% elif env.startswith("pypy3-") %}
17-
- python: 'pypy3.5-6.0'
25+
python: 'pypy3.5-6.0'
1826
{% else %}
19-
- python: '{{ "{0[2]}.{0[3]}".format(env) }}'
27+
python: '{{ "{0[2]}.{0[3]}".format(env) }}'
2028
{% endif %}
2129
env:
2230
- TOXENV={{ env }}{% if 'cover' in env %},report,coveralls,codecov{% endif -%}
2331
{%- endfor %}{{ '' }}
32+
{%- for kind in ['src', 'adhoc'] %}{{ '' }}
33+
- stage: examples
34+
python: '3.6'
35+
script: >
36+
cd examples/{{ kind }}-layout
37+
tox
38+
{%- endfor %}{{ '' }}
2439
before_install:
2540
- python --version
2641
- uname -a

examples/adhoc-layout/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ changedir = tests
2121
skip_install = true
2222
deps = coverage
2323
commands =
24-
coverage report
2524
coverage html
25+
coverage report --fail-under=100
2626

2727
[testenv:clean]
2828
skip_install = true

examples/src-layout/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ depends =
1919
skip_install = true
2020
deps = coverage
2121
commands =
22-
coverage report
2322
coverage html
23+
coverage report --fail-under=100
2424

2525
[testenv:clean]
2626
skip_install = true

0 commit comments

Comments
 (0)