From cf750b47305b2033e3d38625bf2aa4a401f21869 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 12 Oct 2018 10:14:18 +0200 Subject: [PATCH 1/3] CI: Split CI tasks into multiple jobs --- .travis.yml | 47 +++++++++++++++++++++++++++++++++++---------- config/ember-try.js | 2 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2115580..938ed62f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,12 +10,9 @@ branches: except: - /^dependabot\/.*$/ -addons: - chrome: stable - cache: directories: - - $HOME/.npm + - $HOME/.npm before_install: - npm config set spin false @@ -23,12 +20,42 @@ before_install: install: - npm install -script: - # Usually, it's ok to finish the test scenario without reverting - # to the addon's original dependency state, skipping "cleanup". - - npm run test:all -- --skip-cleanup - - npm run test:node - - npm run lint +jobs: + include: + - &ember-test + stage: test + env: TEST_SUITE=test:strip # used only to make Travis UI show description + + addons: + chrome: stable + + script: + # Usually, it's ok to finish the test scenario without reverting + # to the addon's original dependency state, skipping "cleanup". + - npm run test:all -- --skip-cleanup + + - <<: *ember-test + env: TEST_SUITE=test:keep # used only to make Travis UI show description + + - stage: test + env: NAME=lint # used only to make Travis UI show description + + script: + - npm run lint + + - &node-test + stage: test + env: NAME=node-tests # used only to make Travis UI show description + + script: + - npm run test:node + + - <<: *node-test + node_js: 8 + + - <<: *node-test + node_js: 10 + deploy: provider: npm diff --git a/config/ember-try.js b/config/ember-try.js index 04120381..1c782d30 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -11,7 +11,7 @@ module.exports = function() { getChannelURL('canary'), ]).then((urls) => { return { - command: 'npm test', + command: process.env.TEST_SUITE ? `npm ${process.env.TEST_SUITE}` : 'npm test', useVersionCompatibility: true, scenarios: [ { From 75ae392a55c3fccf1e1bfa899c2046992c0a19ed Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Fri, 12 Oct 2018 10:16:11 +0200 Subject: [PATCH 2/3] CI: Run node-independent tests with Node 10 for speeeeeeeeed! --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 938ed62f..1c275ec9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ --- language: node_js node_js: - - "6" + - "10" sudo: false dist: trusty @@ -54,7 +54,7 @@ jobs: node_js: 8 - <<: *node-test - node_js: 10 + node_js: 6 deploy: From 1d470242260b4e0cabda8170ec6b42db47352382 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Thu, 11 Oct 2018 16:05:21 +0200 Subject: [PATCH 3/3] CI: Use `yarn` instead of `npm` --- .travis.yml | 14 +++++++------- config/ember-try.js | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c275ec9..8067ee93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,14 +11,14 @@ branches: - /^dependabot\/.*$/ cache: - directories: - - $HOME/.npm + yarn: true before_install: - - npm config set spin false + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH=$HOME/.yarn/bin:$PATH install: - - npm install + - yarn install --no-lockfile jobs: include: @@ -32,7 +32,7 @@ jobs: script: # Usually, it's ok to finish the test scenario without reverting # to the addon's original dependency state, skipping "cleanup". - - npm run test:all -- --skip-cleanup + - yarn test:all --skip-cleanup - <<: *ember-test env: TEST_SUITE=test:keep # used only to make Travis UI show description @@ -41,14 +41,14 @@ jobs: env: NAME=lint # used only to make Travis UI show description script: - - npm run lint + - yarn lint - &node-test stage: test env: NAME=node-tests # used only to make Travis UI show description script: - - npm run test:node + - yarn test:node - <<: *node-test node_js: 8 diff --git a/config/ember-try.js b/config/ember-try.js index 1c782d30..2835054d 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -11,7 +11,8 @@ module.exports = function() { getChannelURL('canary'), ]).then((urls) => { return { - command: process.env.TEST_SUITE ? `npm ${process.env.TEST_SUITE}` : 'npm test', + useYarn: true, + command: process.env.TEST_SUITE ? `yarn ${process.env.TEST_SUITE}` : 'yarn test', useVersionCompatibility: true, scenarios: [ {