File tree Expand file tree Collapse file tree 2 files changed +40
-9
lines changed Expand file tree Collapse file tree 2 files changed +40
-9
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,37 @@ install:
1010stages :
1111 - test
1212 - moban
13+ - lint
14+
15+ .disable_global : &disable_global
16+ before_install : false
17+ install : true
18+ before_script : false
19+ after_success : false
20+ after_failure : false
21+
22+ .lint : &lint
23+ << : *disable_global
24+ python : 3.6
25+ stage : lint
26+ install : pip install flake8
27+ script : flake8
28+
29+ .moban : &moban
30+ << : *disable_global
31+ python : 2.7
32+ stage : moban
33+ install : pip install moban>=0.0.4
34+ script : make
1335
1436jobs :
1537 include :
16- - stage : moban
17- script :
18- - make
19- - git diff --exit-code
38+ - *moban
39+ - *lint
2040
2141stage : test
2242
2343script :
2444 - find templates/ -type f -name '*.jj2' -exec echo '{}' \;|sed -e "s/templates\//{%include \"/" -e "s/$/\" %}/" > test.file
2545 - moban -c config/data.yml -t test.file -td templates .
2646 - pytest
27- - flake8
Original file line number Diff line number Diff line change @@ -23,11 +23,24 @@ python:
2323stages:
2424 - test
2525 - lint
26+
27+ .disable_global: &disable_global
28+ before_install: false
29+ install: true
30+ before_script: false
31+ after_success: false
32+ after_failure: false
33+
34+ .lint: &lint
35+ <<: *disable_global
36+ python: 3.6
37+ stage: lint
38+ install: pip install flake8
39+ script: flake8
40+
2641jobs:
2742 include:
28- - stage: lint
29- python: 3.6
30- script: make lint
43+ - *lint
3144
3245stage: test
3346
@@ -36,7 +49,6 @@ script: make test
3649before_install:
3750{% block custom_install %}
3851{% endblock%}
39- - if [[ $TRAVIS_PYTHON_VERSION == "2.6" ]]; then pip install flake8==2.6.2; fi
4052 - if [[ -f min_requirements.txt && "$MINREQ" -eq 1 ]]; then
4153 mv min_requirements.txt requirements.txt ;
4254 fi
You can’t perform that action at this time.
0 commit comments