Skip to content

Commit

Permalink
Use build stages to fail early...
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Dec 5, 2017
1 parent f07e869 commit 1753294
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 34 deletions.
79 changes: 46 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,59 @@ addons:
cache:
yarn: true

env:
# we recommend new addons test the current and previous LTS
# as well as latest stable release (bonus points to beta/canary)
- EMBER_TRY_SCENARIO=ember-2.0
- EMBER_TRY_SCENARIO=ember-lts-2.4
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-release-with-jquery
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
stages:
- test
- older version tests
- deploy

jobs:
fail_fast: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

include:
# runs tests with current locked deps and linting
- stage: test
env: NAME=lint # used only to make Travis UI show description
script: yarn lint
- env: NAME=test # used only to make Travis UI show description
script: yarn test
- env: NAME=floating dependencies # used only to make Travis UI show description
install: yarn install --no-lockfile
script: yarn test

# runs tests against each supported Ember version
- stage: older version tests
env: EMBER_TRY_SCENARIO=ember-2.0
- env: EMBER_TRY_SCENARIO=ember-lts-2.4
- env: EMBER_TRY_SCENARIO=ember-lts-2.8
- env: EMBER_TRY_SCENARIO=ember-lts-2.12
- env: EMBER_TRY_SCENARIO=ember-lts-2.16
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-release-with-jquery
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary

# runs deploy if running on a specific tag
- stage: deploy
if: tag IS present
install: yarn global add auto-dist-tag
script: auto-dist-tag --write
deploy:
provider: npm
email: stefan.penner+ember-cli@gmail.com
api_key:
secure: rKej7q7tP+K3XUsKftqVhw8/Tgx6pn30OzV0g39RGVTRjWKvLu36UlF3LtP0AfofIKqsnPcvy+VaV9uCOOFiG6xBlXtVjxtqbplBmvKU1SjBHrwtlK61SdlXNKwIagWxBSbCUNxj+ka0d8gpIxS+sNw4sKGWHufH0CoAjpkerog=
on:
tags: true
repo: emberjs/ember-test-helpers

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --no-lockfile
- yarn install

script:
# Usually, it's ok to finish the test scenario without reverting
# to the addon's original dependency state, skipping "cleanup".
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

before_deploy:
- yarn global add auto-dist-tag
- auto-dist-tag --write

deploy:
provider: npm
email: stefan.penner+ember-cli@gmail.com
api_key:
secure: rKej7q7tP+K3XUsKftqVhw8/Tgx6pn30OzV0g39RGVTRjWKvLu36UlF3LtP0AfofIKqsnPcvy+VaV9uCOOFiG6xBlXtVjxtqbplBmvKU1SjBHrwtlK61SdlXNKwIagWxBSbCUNxj+ka0d8gpIxS+sNw4sKGWHufH0CoAjpkerog=
on:
tags: true
repo: emberjs/ember-test-helpers
- yarn ember try:one $EMBER_TRY_SCENARIO --skip-cleanup
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
"scripts": {
"build": "ember build",
"start": "ember server",
"test": "ember try:each"
"test": "ember test",
"test:all": "ember try:each",
"lint": "eslint addon-test-support config tests"
},
"dependencies": {
"broccoli-funnel": "^2.0.1",
Expand Down

0 comments on commit 1753294

Please sign in to comment.