mithril-vndb/.travis.yml
Pat Cavit 9406c905c0 Travis should lint & bundle before every build (#1441)
Linting doesn't break builds though, because @lhorie doesn't want that.
2016-11-30 11:51:10 -08:00

48 lines
1.6 KiB
YAML

sudo: false
language: node_js
node_js:
- node
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
# Lint (but don't fail build) before running tests
before_script: npm run lint || true
# Run more than just npm test
script: npm run build && npm test
# After a successful build create bundles & commit back to the repo
after_success:
- |
# Only want to commit things on commits to $BRANCH
if [ "$TRAVIS_EVENT_TYPE" == "pull_request" ] || [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
echo "Artifacts only built on $BRANCH"
exit 0
fi
# Set up SSH environment
$(npm bin)/set-up-ssh --key "$encrypted_8b86e0359d64_key" \
--iv "$encrypted_8b86e0359d64_iv" \
--path-encrypted-key "./.deploy.enc"
# Build & commit changes
$(npm bin)/commit-changes --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
--branch "$BRANCH"
env:
global:
# Restrict the branch this will activate on
- BRANCH=rewrite
# 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=