Skip to content

Commit 5ae6145

Browse files
committed
CI: Run make check-before-commit to ensure the working directory unchanged
1 parent 1ccd70b commit 5ae6145

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.travis.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
1717
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
1818
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
19+
- CHECK_TYPE=test
1920
matrix:
2021
- INSTALL_DEB_DEPENDECIES=true
2122
NIPYPE_EXTRAS="doc,tests,nipy,profiler"
@@ -31,6 +32,13 @@ env:
3132
EXTRA_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
3233
CI_SKIP_TEST=1
3334

35+
matrix:
36+
include:
37+
- python: 3.7
38+
env:
39+
- NIPYPE_EXTRAS=dev
40+
CHECK_TYPE=specs
41+
3442
addons:
3543
apt:
3644
packages:
@@ -64,7 +72,16 @@ install:
6472
- travis_retry pip install pytest-xdist
6573

6674
script:
67-
- py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype -n auto
75+
- |
76+
if [ "$CHECK_TYPE" = "test" ]; then
77+
py.test -v --cov nipype --cov-config .coveragerc --cov-report xml:cov.xml -c nipype/pytest.ini --doctest-modules nipype -n auto
78+
fi
79+
- |
80+
if [ "CHECK_TYPE" = "specs" ]; then
81+
make check-before-commit
82+
git add nipype
83+
test "$( git diff --cached | wc -l )" -eq 0 || ( git diff --cached && false )
84+
fi
6885
6986
after_script:
7087
- codecov --file cov.xml --flags unittests -e TRAVIS_JOB_NUMBER

0 commit comments

Comments
 (0)