Skip to content

Commit

Permalink
Add Git check for Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Feb 27, 2015
1 parent 4a0c374 commit f1c3c8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitattributes
@@ -0,0 +1,3 @@
*.rst tex conflict-marker-size=100
c2cgeoportal/scaffolds/update/+package+/static/mobile/+dot+sencha/** -whitespace
c2cgeoportal/scaffolds/update/+package+/static/mobile/touch/** -whitespace
8 changes: 5 additions & 3 deletions .travis.yml
Expand Up @@ -14,7 +14,7 @@ env:
before_install:
- cat /etc/apt/sources.list.d/*
- sudo apt-get install -y --force-yes aptitude
- sudo add-apt-repository -y ppa:stephane-brunner/precise-gis
- sudo add-apt-repository -y ppa:stephane-brunner/precise-gis
- sudo apt-get update
- sudo aptitude install -y apache2 facter libapache2-mod-wsgi tomcat7 deploy cgi-mapserver postgis=2.0.3-2~precise4 postgresql-9.1-postgis-2.0=2.0.3-2~precise4 postgresql-9.1-postgis-2.0-scripts=2.0.3-2~precise4
- dpkg -l | grep postgis
Expand Down Expand Up @@ -44,8 +44,10 @@ install:
- sudo /usr/sbin/apache2ctl graceful
- .build/venv/bin/flake8 --version

script:
- find /tmp/test/CONST_alembic /tmp/test/test -name \*.py | xargs .build/venv/bin/flake8 --copyright-check --copyright-min-file-size=1 --copyright-regexp="Copyright \(c\) [0-9\-]*$(shell date +%Y), Camptocamp SA"
script:
- if [ ${TRAVIS_PULL_REQUEST}} != "false" ] ; then git diff --check ${TRAVIS_BRANCH} ; fi
- find /tmp/test/CONST_alembic -name \*.py | xargs .build/venv/bin/flake8 --copyright-check --copyright-min-file-size=1 --copyright-regexp="Copyright \(c\) [0-9\-]*$(shell date +%Y), Camptocamp SA" --max-line-length=100
- find /tmp/test/setup.py /tmp/test/test/*.py /tmp/test/test/views -name \*.py | xargs .build/venv/bin/flake8
# Actually don't work on travis see:
# https://travis-ci.org/camptocamp/c2cgeoportal/jobs/48455036#L5312
#- travis/test-new-project.sh
Expand Down

0 comments on commit f1c3c8d

Please sign in to comment.