sudo: false # Only care about running tests against latest node language: node_js node_js: - node # Keep node_modules around, it speeds up builds & they don't change often cache: directories: - node_modules # Custom install step so the travis scripts don't need to be in package.json install: - npm install - npm install @alrra/travis-scripts@^3.0.1 # Bundle before running tests so the bundle is always up-to-date before_script: npm run build # This is the default, but leaving so it is obvious # script: npm test # After a successful build create bundles & commit back to the repo after_success: - | # Only want to commit when building a push on whatever $BRANCH is if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \ [ "$TRAVIS_BRANCH" == "$BRANCH" ] && \ [ "$TRAVIS_REPO_SLUG" == "$REPO" ] then # Set up SSH environment $(npm bin)/set-up-ssh \ --key "$encrypted_8b86e0359d64_key" \ --iv "$encrypted_8b86e0359d64_iv" \ --path-encrypted-key "./.deploy.enc" # Commit changes (if there were any) from running build earlier $(npm bin)/commit-changes \ --commands "echo committing" \ --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \ --branch "$BRANCH" else echo "Not submitting build artifacts" fi # Environment configuration env: global: # Restrict the branch this will activate on - BRANCH=next - REPO=lhorie/mithril.js # Set up GH_USER_EMAIL & GH_USER_NAME env variables used by travis-scripts package - secure: Xvqvm3+PvJu/rs3jl/NNn0RWLkkLkIoPHiL0GCfVRaywgjCYVN02g54NVvIDaOfybqPmu9E6PJFVs92vhF34NMFQHf4EWskynusIGV271R2BV0i+OJBfLMuLgiwm6zRn7/Zw4JvWIUGEwcnlz0qxbqdHsS0SOR3fIkFzePickW0= - secure: Rf/ldEO9d4vItJhe6EmqWpFAyCARzoCb422nHnjr1hYJknnwIXpgyZ1C/7On/9o7rWPPf+8WcHC/rgjK2rthKCldzdG5I60LfWSNzap9lk3Aa4TpSCoDBuEp7JVvDr5tc3rKnBXVT71hOay7RSx1StWzXiJs9mjaeVMJzYzRT78= # Deploy to npm on tagged commits that successfully build deploy: provider: npm email: npm@patcavit.com skip_cleanup: true api_key: secure: ADElvD1oxn9GfEG7dDOggX96b36A/cGEybovAc0221CCKzv5kWCavMrtxneiJYI6N/n24abSlbM90vMfU84FEzH0Ev28dGVokRP4ad6VRkISszKlYVEP8Lds4QxfKh78jZlUxmxM0B3vmQ1kYJbTBqp3ICtaJ5ptEQHWhrLtxnc= on: tags: true repo: lhorie/mithril.js