Skip to content

Commit 09d393c

Browse files
webknjazMariatta
authored andcommitted
Refactor Travis CI config (#252)
Reduce copypaste using YAML anchor in Travis cfg
1 parent da1c52b commit 09d393c

File tree

1 file changed

+29
-33
lines changed

1 file changed

+29
-33
lines changed

.travis.yml

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,38 @@
11
language: python
2-
matrix:
3-
include:
4-
- python: "3.5"
5-
env: BLURB=true CHERRY_PICKER=false
6-
- python: "3.6-dev"
7-
env: BLURB=true CHERRY_PICKER=true
8-
- python: "3.7-dev"
9-
env: BLURB=true CHERRY_PICKER=true
10-
- python: "nightly"
11-
env: BLURB=true CHERRY_PICKER=true
2+
python:
3+
- "3.5"
4+
- "3.6-dev"
5+
- "3.7-dev"
6+
- "nightly"
127

138
dist: trusty
149
sudo: false
1510
cache: pip
1611

1712
before_install:
18-
- pip install --upgrade flit
13+
- pip install --upgrade flit
1914
install:
20-
- |
21-
if [[ $CHERRY_PICKER == true ]]; then
22-
pushd cherry_picker
23-
flit install
24-
popd
25-
fi;
26-
- |
27-
if [[ $BLURB == true ]]; then
28-
pushd blurb
29-
flit install
30-
popd
31-
fi;
15+
- pushd blurb
16+
- flit install
17+
- popd
3218
script:
33-
- |
34-
if [[ $CHERRY_PICKER == true ]]; then
35-
pushd cherry_picker
36-
pytest cherry_picker/test.py -v
37-
popd
38-
fi;
39-
- |
40-
if [[ $BLURB == true ]]; then
41-
blurb test
42-
fi;
19+
- blurb test
20+
21+
.mixtures:
22+
- &install-and-test-cherry-picker
23+
install:
24+
- pushd cherry_picker
25+
- flit install
26+
- popd
27+
script:
28+
- pushd cherry_picker
29+
- pytest cherry_picker/test.py -v
30+
- popd
31+
jobs:
32+
include:
33+
- python: "3.6-dev"
34+
<<: *install-and-test-cherry-picker
35+
- python: "3.7-dev"
36+
<<: *install-and-test-cherry-picker
37+
- python: "nightly"
38+
<<: *install-and-test-cherry-picker

0 commit comments

Comments
 (0)