Siggg/culottes

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
dist: xenial
addons:
  chrome: stable
language: node_js
node_js:
- "lts/*"

# fails as soon as an error occurs
matrix:
  fast_finish: true

# puts node_modules in cache
# please note that, with open libraries used via npm, 'npm prune' is
# strongly recommended so that tests are not executed on packages
# that would still be in cache but would not be in package.json
cache:
  directories:
    - node_modules

before_install:
  - rm -rf node_modules/websocket/.git
  - rm -rf node_modules/web3/node_modules/websocket/.git

    #  - npm prune
    #  I remove the line above because of the "error invalid bin entry for package" error message
    #  caused by this npm 6.13.4 bug https://github.com/npm/cli/issues/613

install: ./ci/install-deps.sh

script: ./ci/build.sh

deploy:
  provider: pages

  # very important : we keep our build or our built files would get deleted
  skip_cleanup: true

  # I suppose the value is read from travis-ci.org user config
  github_token: $GITHUB_TOKEN
  local_dir: docs
  on:
    branch: master

# environment variables
env:
  global:
    - NODE_ENV=production
    - GIT_DEPLOY_REPO=https://$GITHUB_TOKEN@github.com/siggg/culottes.git

# useful tips found at https://putaindecode.io/articles/deploiement-continu-avec-travis-ci-et-gh-pages/