Skip to content

Commit

Permalink
upgrade CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Jul 21, 2018
1 parent fa0302e commit 777bdf1
Show file tree
Hide file tree
Showing 10 changed files with 131 additions and 150 deletions.
19 changes: 16 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/blueprints/*/files/**/*.js
/dist
/vendor
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/coverage/

# ember-try
/.node_modules.ember-try/
9 changes: 6 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ module.exports = {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended'
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true
Expand All @@ -27,8 +31,7 @@ module.exports = {
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**',
'mu-trees/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
Expand Down
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/dist/
/tmp/

# dependencies
/node_modules
/bower_components
/bower_components/
/node_modules/

# misc
/.sass-cache
/connect.lock
/coverage/*
/coverage/
/libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
bower.json
ember-cli-build.js
testem.js
yarn.lock

# ember-try
.node_modules.ember-try/
Expand Down
65 changes: 25 additions & 40 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ language: node_js
node_js:
# we recommend testing addons with the same minimum supported node version as Ember CLI
# so that your addon works for all apps
- "4"
- "6"

sudo: required
sudo: false
dist: trusty

addons:
Expand All @@ -14,50 +14,35 @@ addons:
cache:
yarn: true

env:
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.12
- EMBER_TRY_SCENARIO=ember-lts-2.16
- EMBER_TRY_SCENARIO=ember-lts-2.18
- EMBER_TRY_SCENARIO=ember-release
- EMBER_TRY_SCENARIO=ember-beta
- EMBER_TRY_SCENARIO=ember-canary
- EMBER_TRY_SCENARIO=ember-default

matrix:
fast_finish: true
allow_failures:
- env: EMBER_TRY_SCENARIO=ember-canary

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

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

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

env:
global:
# See https://git.io/vdao3 for details.
- JOBS=1

jobs:
fail_fast: true

include:
# runs tests in chrome with current locked deps and linting

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

# If that passes:
# - run tests without pinned dependencies to catch issues with new versions
# - run tests in each supported ember version
- stage: additional tests
env: NAME=floating dependencies
install: yarn install --no-lockfile --non-interactive
script:
- yarn test

- env: EMBER_TRY_SCENARIO=ember-1.13
- 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-lts-2.18
- env: EMBER_TRY_SCENARIO=ember-release
- env: EMBER_TRY_SCENARIO=ember-beta
- env: EMBER_TRY_SCENARIO=ember-canary
- env: EMBER_TRY_SCENARIO=module-unification
68 changes: 7 additions & 61 deletions config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,14 @@
const getChannelURL = require('ember-source-channel-url');

module.exports = function() {
// eslint-disable-next-line no-undef
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary'),
getChannelURL('canary')
]).then((urls) => {
return {
useYarn: true,
scenarios: [
{
name: 'module-unification',
command: 'EMBER_CLI_MODULE_UNIFICATION=true ember test'
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
},
{
name: 'ember-1.13',
bower: {
dependencies: {
'ember': '~1.13.0'
},
resolutions: {
'ember': '~1.13.0'
}
},
npm: {
devDependencies: {
"ember-debug-handlers-polyfill": "^1.1.1",
'ember-source': null
}
}
},
{
name: 'ember-lts-2.4',
bower: {
dependencies: {
'ember': '~2.4.0'
},
resolutions: {
'ember': '~2.4.0'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.8',
bower: {
dependencies: {
'ember': 'components/ember#lts-2-8'
},
resolutions: {
'ember': 'lts-2-8'
}
},
npm: {
devDependencies: {
'ember-source': null
}
}
},
{
name: 'ember-lts-2.12',
npm: {
Expand Down Expand Up @@ -118,6 +58,12 @@ module.exports = function() {
'ember-source': urls[2]
}
}
},
{
name: 'ember-default',
npm: {
devDependencies: {}
}
}
]
};
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
},
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"ember-cli": "~3.1.4",
"ember-cli": "~3.3.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-htmlbars": "^2.0.1",
Expand All @@ -52,7 +52,8 @@
"ember-try": "^0.2.23",
"eslint": "^4.19.1",
"eslint-plugin-node": "^6.0.1",
"loader.js": "^4.2.3"
"loader.js": "^4.2.3",
"qunit-dom": "^0.6.2"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
Expand Down
11 changes: 6 additions & 5 deletions testem.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ module.exports = {
],
browser_args: {
Chrome: {
mode: 'ci',
args: [
ci: [
// --no-sandbox is needed when running Chrome inside a container
process.env.TRAVIS ? '--no-sandbox' : null,

'--disable-gpu',
process.env.CI ? '--no-sandbox' : null,
'--headless',
'--disable-gpu',
'--disable-dev-shm-usage',
'--disable-software-rasterizer',
'--mute-audio',
'--remote-debugging-port=0',
'--window-size=1440,900'
].filter(Boolean)
Expand Down
3 changes: 2 additions & 1 deletion tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ module.exports = function(environment) {
if (environment === 'test') {
// Testem prefers this...
ENV.locationType = 'none';
ENV.APP.autoboot = false;

// keep test console output quieter
ENV.APP.LOG_ACTIVE_GENERATION = false;
ENV.APP.LOG_VIEW_LOOKUPS = false;

ENV.APP.rootElement = '#ember-testing';
ENV.APP.autoboot = false;
}

if (environment === 'production') {
Expand Down
Loading

0 comments on commit 777bdf1

Please sign in to comment.