language: node_js

notifications:
  email: false

node_js:
  - '8'

cache:
  directories:
    - "node_modules"
    - "public"
    - ~/.npm
git:
  depth: 3

branches:
  except:
    - /^v\d+\.\d+\.\d+$/

before_install:
  - npm i -g npm@5.5.1

install: npm install

before_script:
  - npm install -g mocha gulp gulp-minify gulp-clean-css del
  - export AUTHOR_NAME="$(git log -1 $TRAVIS_COMMIT --pretty="%aN")"

script:
  - npm test

after_success:
  - chmod +x .github/success.sh
  - ./.github/success.sh
  - npm run travis-deploy-once "npm run semantic-release"
after_failure:
  - chmod +x .github/fail.sh
  - ./.github/fail.sh
