mirror of
https://github.com/scratchfoundation/scratch-svg-renderer.git
synced 2024-11-14 19:25:41 -05:00
Simplify Travis CI scripts, fix deploy
This commit is contained in:
parent
8332d706e1
commit
c2570133dd
1 changed files with 13 additions and 14 deletions
23
.travis.yml
23
.travis.yml
|
@ -3,8 +3,6 @@ node_js:
|
|||
- 6
|
||||
- node
|
||||
env:
|
||||
- NPM_SCRIPT="test:unit -- --jobs=4"
|
||||
- NPM_SCRIPT="test:integration -- --jobs=4"
|
||||
- NODE_ENV=production
|
||||
sudo: false
|
||||
cache:
|
||||
|
@ -14,23 +12,24 @@ install:
|
|||
- npm --production=false install
|
||||
- npm --production=false update
|
||||
- npm --production=false prune
|
||||
script: npm run $NPM_SCRIPT
|
||||
jobs:
|
||||
include:
|
||||
- env: NPM_SCRIPT=test:lint
|
||||
- stage: test
|
||||
script:
|
||||
- npm run test:lint
|
||||
- npm run test:unit -- --jobs=4
|
||||
- npm run test:integration -- --jobs=4
|
||||
- stage: build
|
||||
script: npm run build
|
||||
skip_cleanup: true
|
||||
node_js: 6
|
||||
- stage: release
|
||||
node_js: 6
|
||||
env: NPM_SCRIPT=build
|
||||
before_deploy:
|
||||
- if: branch IN (env(RELEASE_BRANCHES))
|
||||
- npm --no-git-tag-version version $($(npm bin)/json -f package.json version)-prerelease.$(date +%s)
|
||||
- git config --global user.email $(git log --pretty=format:"%ae" -n1)
|
||||
- git config --global user.name $(git log --pretty=format:"%an" -n1)
|
||||
deploy:
|
||||
- provider: npm
|
||||
"on":
|
||||
all_branches: true
|
||||
condition: $RELEASE_BRANCHES =~ $TRAVIS_BRANCH
|
||||
skip_cleanup: true
|
||||
if: branch IN (env(RELEASE_BRANCHES))
|
||||
provider: npm
|
||||
email: $NPM_EMAIL
|
||||
api_key: $NPM_TOKEN
|
||||
|
|
Loading…
Reference in a new issue