Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Travis setup to leverage stages... #5342

Merged
merged 9 commits into from
Jan 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 56 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,74 @@ sudo: false
dist: trusty
node_js:
- "4"
- "6"

# hack to get after_success skipped in node 4
matrix:
exclude:
- node_js: "4"
include:
- node_js: "4"
after_success: skip
addons:
chrome: stable

cache:
yarn: true

stages:
- test
- additional tests
- older version tests
- deploy

jobs:
fail_fast: true

include:
# runs tests with current locked deps and linting
- stage: test
env: NAME=test # used only to make Travis UI show description
script:
- ./bin/lint-features
- yarn test

- stage: additional tests
env: NAME=optional-features # used only to make Travis UI show description
install: yarn install
script: yarn test:optional-features

- env: NAME=floating dependencies # used only to make Travis UI show description
install: yarn install --no-lockfile --non-interactive
script: yarn test

- env: NAME=production # used only to make Travis UI show description
install: yarn install
script: yarn test:production

- env: NAME=node-tests # used only to make Travis UI show description
install: yarn install
script: yarn test:node

# runs tests against each supported Ember version
- stage: older version tests
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-beta
- env: EMBER_TRY_SCENARIO=ember-canary

- stage: deploy
if: branch IN (master, beta, release) OR tag IS present
env: NAME=publish # used only to make Travis UI show description
install: yarn install
script:
- yarn build:production
- "./bin/publish-builds"


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

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

script:
- ./bin/lint-features
- yarn run test
- yarn run test:optional-features
- yarn run test:production
- yarn run node-tests
after_success:
- yarn run production
- "./bin/publish-builds"
- node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

env:
global:
- BROCCOLI_ENV="production"
Expand Down
11 changes: 4 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@ cache:
install:
# Get the latest stable version of Node 0.STABLE.latest
- ps: Install-Product node $env:nodejs_version
# Install PhantomJS
- choco install phantomjs --version 2.0.0 -y
- set path=%path%;C:\ProgramData\chocolatey\lib\PhantomJS\tools\
# Typical npm stuff.
- md C:\nc
- appveyor-retry yarn install
# Post-install test scripts.
test_script:
# Output useful info for debugging.
- cmd: yarn run test-appveyor
- cmd: yarn run test:optional-features
- cmd: yarn run test:production
- cmd: yarn run node-tests
- cmd: yarn test
- cmd: yarn test:optional-features
- cmd: yarn test:production
- cmd: yarn test:node

# Don't actually build.
build: off
Expand Down
3 changes: 0 additions & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ module.exports = function(defaults) {
// while ember-data strips itself, ember does not currently
[StripClassCallCheck]
]
},
'ember-cli-babel': {
includePolyfill: true
}
});

Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"scripts": {
"build": "ember build",
"build:production": "ember build --environment=production",
"start": "ember server",
"test": "ember try:testall",
"test-appveyor": "ember test",
"node-tests": "node node-tests/nodetest-runner.js",
"test:optional-features": "ember test --environment=test-optional-features",
"test": "ember test",
"test:all": "ember try:each",
"test:node": "node node-tests/nodetest-runner.js",
"test:production": "ember test --environment=production",
"production": "ember build --environment=production"
"test:optional-features": "ember test --environment=test-optional-features"
},
"author": "",
"license": "MIT",
Expand Down Expand Up @@ -97,6 +97,7 @@
"ember-resolver": "^4.1.0",
"ember-source": "~2.11.0",
"ember-source-channel-url": "^1.0.1",
"ember-try": "^0.2.23",
"ember-watson": "^0.7.0",
"express": "^4.14.0",
"faker": "^3.1.0",
Expand Down
17 changes: 14 additions & 3 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ module.exports = {
"disable_watching": true,
"reporter": "dot",
"launch_in_ci": [
"PhantomJS"
"Chrome"
],
"launch_in_dev": [
"PhantomJS",
"Chrome"
]
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
'--headless',
'--remote-debugging-port=0',
'--window-size=1440,900',
'--no-sandbox'
]
}
}
};
2 changes: 1 addition & 1 deletion tests/unit/store/push-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ test('Calling pushPayload allows partial updates with raw JSON', function(assert
assert.equal(person.get('lastName'), 'Jackson', 'existing fields are untouched');
});

test('calling push without data argument as an object raises an error', function(assert) {
testInDebug('calling push without data argument as an object raises an error', function(assert) {
let invalidValues = [
null,
1,
Expand Down
26 changes: 26 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2732,6 +2732,15 @@ ember-try-config@^2.0.1:
rsvp "^3.2.1"
semver "^5.1.0"

ember-try-config@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/ember-try-config/-/ember-try-config-2.2.0.tgz#6be0af6c71949813e02ac793564fddbf8336b807"
dependencies:
lodash "^4.6.1"
node-fetch "^1.3.3"
rsvp "^3.2.1"
semver "^5.1.0"

ember-try@^0.2.15:
version "0.2.17"
resolved "https://registry.yarnpkg.com/ember-try/-/ember-try-0.2.17.tgz#0ffff687630291b4cf94f5b196e728c1a92d8aec"
Expand All @@ -2750,6 +2759,23 @@ ember-try@^0.2.15:
rsvp "^3.0.17"
semver "^5.1.0"

ember-try@^0.2.23:
version "0.2.23"
resolved "https://registry.yarnpkg.com/ember-try/-/ember-try-0.2.23.tgz#39b57141b4907541d0ac8b503d211e6946b08718"
dependencies:
chalk "^1.0.0"
cli-table2 "^0.2.0"
core-object "^1.1.0"
debug "^2.2.0"
ember-try-config "^2.2.0"
extend "^3.0.0"
fs-extra "^0.26.0"
promise-map-series "^0.2.1"
resolve "^1.1.6"
rimraf "^2.3.2"
rsvp "^3.0.17"
semver "^5.1.0"

ember-watson@^0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/ember-watson/-/ember-watson-0.7.0.tgz#e7243ba128fb39a6205cddb61774043d093c5163"
Expand Down