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

Fix some jobs on Travis Trusty #187

Merged
merged 15 commits into from
Nov 9, 2017
Merged
37 changes: 19 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
---
dist: precise
language: node_js
node_js:
- "6"

sudo: false
dist: trusty

addons:
chrome: stable

cache:
directories:
- $HOME/.npm

env:
- EMBER_TRY_SCENARIO=ember-2.4-stack
- EMBER_TRY_SCENARIO=ember-lts-2.8
- EMBER_TRY_SCENARIO=ember-2.10-stack
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-2.14-stack
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
# - EMBER_TRY_SCENARIO=ember-canary
global:
# See https://git.io/vdao3 for details.
- JOBS=1
matrix:
# 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-lts-2.8
- EMBER_TRY_SCENARIO=ember-lts-2.12
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
Expand All @@ -27,16 +34,10 @@ matrix:

before_install:
- npm config set spin false
- npm install -g bower
- bower --version
- npm install -g phantomjs-prebuilt
- phantomjs --version

install:
- npm install
- bower install
- npm install -g npm@4
- npm --version

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

This file was deleted.

110 changes: 45 additions & 65 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,102 +2,82 @@
module.exports = {
scenarios: [
{
name: 'ember-2.4-stack',
npm: {
devDependencies: {
'ember-data': '2.4.3',
'ember-inflector': '^1.9.4',
'ember-source': null,
'ember-cli-shims': null
}
},
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': '2.4.6',
"ember-cli-shims": "0.1.1"
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': 'lts-2-8'
}
}
},
{
name: 'ember-lts-2.8',
},
npm: {
devDependencies: {
'ember-data': '2.8.1',
'ember-inflector': '^1.9.4',
'ember-source': null,
'ember-cli-shims': null
}
},
bower: {
dependencies: {
'ember': '2.8.3',
"ember-cli-shims": "0.1.1"
'ember-source': null
}
}
},
{
name: 'ember-2.10-stack',
name: 'ember-lts-2.12',
npm: {
devDependencies: {
'ember-data': '2.10.0',
'ember-inflector': '^1.9.4',
'ember-source': null,
'ember-cli-shims': null
}
},
bower: {
dependencies: {
'ember': '2.10.2',
"ember-cli-shims": "0.1.1"
'ember-source': '~2.12.0'
}
}
},
{
name: 'ember-lts-2.12',
name: 'ember-release',
bower: {
dependencies: {
'ember': 'components/ember#release'
},
resolutions: {
'ember': 'release'
}
},
npm: {
devDependencies: {
'ember-data': '2.12.2',
'ember-inflector': '^1.9.4',
'ember-source': '2.12.2',
'ember-cli-shims': "^1.1.0"
'ember-source': null
}
},
}
},
{
name: 'ember-2.14-stack',
name: 'ember-beta',
bower: {
dependencies: {
'ember': 'components/ember#beta'
},
resolutions: {
'ember': 'beta'
}
},
npm: {
devDependencies: {
'ember-data': '2.14.10',
'ember-source': '2.14.1',
'ember-source': null
}
},
}
},
{
name: 'ember-release',
name: 'ember-canary',
bower: {
dependencies: {
'ember': 'components/ember#canary'
},
resolutions: {
'ember': 'canary'
}
},
npm: {
devDependencies: {
'ember-data': 'latest',
'ember-source': 'latest',
},
'ember-source': null
}
}
},
{
name: 'ember-beta',
name: 'ember-default',
npm: {
devDependencies: {
'ember-data': 'beta',
'ember-source': 'beta',
},
devDependencies: {}
}
},
// {
// name: 'ember-canary',
// npm: {
// devDependencies: {
// 'ember-data': 'components/ember-data#canary',
// 'ember-source': 'components/ember#canary',
// },
// },
// }
}
]
};
3 changes: 0 additions & 3 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ module.exports = function(defaults) {
This build file does *not* influence how the addon or the app using it
behave. You most likely want to be modifying `./index.js` or app's build file
*/
app.import('bower_components/phantomjs-polyfill-object-assign/object-assign-polyfill.js', {
type: 'test'
});

return app.toTree();
};
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"CouchDB"
],
"engines": {
"node": ">= 0.10.0"
"node": "^4.5 || 6.* || >= 7.*"
},
"author": "Nolan Lawson",
"license": "Apache-2.0",
Expand All @@ -34,36 +34,32 @@
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-ajax": "^3.0.0",
"ember-cli": "~2.14.1",
"ember-cli": "~2.16.2",
"ember-cli-app-version": "^1.0.0",
"ember-cli-dependency-checker": "^1.3.0",
"ember-cli-eslint": "^3.0.0",
"ember-cli-dependency-checker": "^2.0.0",
"ember-cli-eslint": "^4.0.0",
"ember-cli-htmlbars": "^2.0.1",
"ember-cli-htmlbars-inline-precompile": "^0.4.3",
"ember-cli-htmlbars-inline-precompile": "^1.0.0",
"ember-cli-inject-live-reload": "^1.4.1",
"ember-cli-qunit": "^4.0.0",
"ember-cli-release": "^0.2.9",
"ember-cli-shims": "^1.1.0",
"ember-cli-sri": "^2.1.0",
"ember-cli-test-loader": "^1.1.0",
"ember-cli-uglify": "^1.2.0",
"ember-data": "2.14.10",
"ember-disable-prototype-extensions": "^1.1.2",
"ember-export-application-global": "^2.0.0",
"ember-inflector": "^2.0.0",
"ember-load-initializers": "^1.0.0",
"ember-resolver": "^4.0.0",
"ember-source": "~2.14.1",
"ember-source": "~2.16.0",
"loader.js": "^4.2.3"
},
"dependencies": {
"broccoli-stew": "^1.3.1",
"pouchdb": "^6.3.4",
"relational-pouch": "^2.1.0",
"ember-cli-babel": "^6.3.0"
},
"engines": {
"node": "^4.5 || 6.* || >= 7.*"
"ember-cli-babel": "^6.7.1"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down
16 changes: 13 additions & 3 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,20 @@ module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
launch_in_ci: [
'PhantomJS'
'Chrome'
],
launch_in_dev: [
'PhantomJS',
'Chrome'
]
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
'--disable-gpu',
'--headless',
'--remote-debugging-port=9222',
'--window-size=1440,900'
]
},
}
};
4 changes: 2 additions & 2 deletions tests/dummy/app/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Ember from 'ember';
import Application from '@ember/application';
import Resolver from './resolver';
import loadInitializers from 'ember-load-initializers';
import config from './config/environment';

const App = Ember.Application.extend({
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

{{content-for "head"}}

<link rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link rel="stylesheet" href="{{rootURL}}assets/dummy.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css">
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/dummy.css">

{{content-for "head-footer"}}
</head>
Expand Down
4 changes: 2 additions & 2 deletions tests/dummy/app/router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Ember from 'ember';
import EmberRouter from '@ember/routing/router';
import config from './config/environment';

const Router = Ember.Router.extend({
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
});
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = function(environment) {
}

if (environment === 'production') {

// here you can enable a production-specific feature
}

return ENV;
Expand Down
4 changes: 2 additions & 2 deletions tests/helpers/destroy-app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Ember from 'ember';
import { run } from '@ember/runloop';

export default function destroyApp(application) {
Ember.run(application, 'destroy');
run(application, 'destroy');
}
4 changes: 1 addition & 3 deletions tests/helpers/module-for-acceptance.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { module } from 'qunit';
import Ember from 'ember';
import { resolve } from 'rsvp';
import startApp from '../helpers/start-app';
import destroyApp from '../helpers/destroy-app';

const { RSVP: { resolve } } = Ember;

export default function(name, options = {}) {
module(name, {
beforeEach() {
Expand Down
9 changes: 5 additions & 4 deletions tests/helpers/start-app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import Ember from 'ember';
import Application from '../../app';
import config from '../../config/environment';
import { merge } from '@ember/polyfills';
import { run } from '@ember/runloop';

export default function startApp(attrs) {
let attributes = Ember.merge({}, config.APP);
attributes = Ember.merge(attributes, attrs); // use defaults, but you can override;
let attributes = merge({}, config.APP);
attributes = merge(attributes, attrs); // use defaults, but you can override;

return Ember.run(() => {
return run(() => {
let application = Application.create(attributes);
application.setupForTesting();
application.injectTestHelpers();
Expand Down