Skip to content

Commit 03c9d8a

Browse files
mansonakategengler
andcommitted
explicitly separating yarn and npm scenarios
Co-authored-by: Katie Gengler <[email protected]>
1 parent 71cdfb7 commit 03c9d8a

6 files changed

Lines changed: 44 additions & 10 deletions

File tree

.travis.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,25 @@ jobs:
3232
- stage: tests
3333
name: Node 10 With Coverage
3434
script:
35-
- yarn lint
36-
- yarn node-test-with-coverage
35+
- yarn lint
36+
- yarn node-test-with-coverage
3737
- stage: additional tests
3838
name: floating dependencies
3939
install: yarn install --no-lockfile
4040
- name: All Commands Smoke Test
41-
script:
42-
- npm run client-test
41+
script: npm run client-test
4342
- name: Node 6 Smoke Test
4443
node_js: '6'
45-
script:
46-
- npm run smoke-test
44+
script: npm run smoke-test
4745
- name: Node 8 Smoke Test
4846
node_js: '8'
49-
script:
50-
- npm run smoke-test
47+
script: npm run smoke-test
48+
- name: Node 6 Yarn Smoke Test
49+
node_js: '6'
50+
script: yarn smoke-test-yarn
51+
- name: Node 8 Yarn Smoke Test
52+
node_js: '8'
53+
script: yarn smoke-test-yarn
5154
- stage: deploy
5255
if: tag IS present
5356
node_js: "10"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"all-test": "npm run-script node-test && npm run-script smoke-test",
1414
"node-test-with-coverage": "nyc --reporter lcov npm run-script node-test && node_modules/.bin/codecov",
1515
"smoke-test": "./run-smoke-test.sh smoke-test.sh",
16+
"smoke-test-yarn": "./run-smoke-test.sh smoke-test-yarn.sh",
1617
"lint": "eslint lib test"
1718
},
1819
"engines": {

run-smoke-test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@ rm ember-try*.tgz || true
55
npm pack
66
now=$(date +%s)
77
mv ember-try*.tgz "ember-try-${now}.tgz"
8-
cd smoke-test-app && npm i && npm i --save-dev "../ember-try-${now}.tgz" && "./${1}"
8+
if [[ $npm_execpath =~ ^.*yarn.*$ ]]; then
9+
cd smoke-test-app && yarn upgrade "ember-try@file:../ember-try-${now}.tgz" && yarn install && "./${1}"
10+
else
11+
cd smoke-test-app && npm install --save-dev "../ember-try-${now}.tgz" && npm install && "./${1}"
12+
fi
13+

smoke-test-app/smoke-test-yarn.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
4+
ember try:one test2 --config-path='../test/fixtures/dummy-ember-try-config-with-yarn-scenarios.js'

test/fixtures/dummy-ember-try-config-with-npm-scenarios.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
2-
useYarn: true,
32
scenarios: [
43
{
54
name: 'test1',
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
useYarn: true,
3+
scenarios: [
4+
{
5+
name: 'test1',
6+
bower: {
7+
dependencies: {
8+
ember: '2.18.0'
9+
}
10+
}
11+
},
12+
{
13+
name: 'test2',
14+
command: 'ember test',
15+
npm: {
16+
dependencies: {
17+
'ember-moment': '7.5.0'
18+
}
19+
}
20+
}
21+
]
22+
};

0 commit comments

Comments
 (0)