language: python
python:
  - 3.6

cache:
  pip: true
  directories:
    - .venv

env:
  global:
    - RANDOM_SEED=0
    - PIPENV_NOSPIN=true

before_install:
  - make setup doctor

install:
  - make install

script:
  - make check
  - make test

after_success: >
  pip install coveralls scrutinizer-ocular
  coveralls
  ocular
  echo $TRAVIS_BRANCH; echo $TRAVIS_PULL_REQUEST;
  if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then

    # Copy the generated files
    cp *.csv pages/
    cp *.txt pages/
    cp *.osm_json pages/
    cp *.geojson pages/

    # Configure Git with Travis CI information
    git config --global user.email "travis@travis-ci.org" ;
    git config --global user.name "travis-ci" ;

    # Delete the current repository
    rm -rf .git ;

    # Rebuild the repository from the generated files and push to GitHub pages
    cd pages ;
    touch .nojekyll ;
    git init ;
    git add . ;
    git commit -m "Deploy Travis CI build $TRAVIS_BUILD_NUMBER to GitHub pages" ;
    git push -f https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} master:gh-pages ;

  fi

notifications:
  email:
    on_success: never
    on_failure: change

language: python
python:
  - 3.6

cache:
  pip: true
  directories:
    - .venv

env:
  global:
    - RANDOM_SEED=0
    - PIPENV_NOSPIN=true

before_install:
  - make setup doctor

install:
  - make install

script:
  - make check
  - make test
  - make run

after_success: >
  pip install coveralls scrutinizer-ocular
  coveralls
  ocular
  echo $TRAVIS_BRANCH; echo $TRAVIS_PULL_REQUEST;
  if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then

    # Copy the generated files
    cp *.csv pages/
    cp *.txt pages/
    cp *.osm_json pages/
    cp *.geojson pages/

    # Configure Git with Travis CI information
    git config --global user.email "travis@travis-ci.org" ;
    git config --global user.name "travis-ci" ;

    # Delete the current repository
    rm -rf .git ;

    # Rebuild the repository from the generated files and push to GitHub pages
    cd pages ;
    touch .nojekyll ;
    git init ;
    git add . ;
    git commit -m "Deploy Travis CI build $TRAVIS_BUILD_NUMBER to GitHub pages" ;
    git push -f https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} master:gh-pages ;

  fi

notifications:
  email:
    on_success: never
    on_failure: change

Build the site as part of CI
Build the site as part of CI
