|
1 | 1 | --- |
2 | 2 | language: node_js |
3 | 3 | node_js: |
4 | | - - "6" |
| 4 | + # we recommend testing addons with the same minimum supported node version as Ember CLI |
| 5 | + # so that your addon works for all apps |
| 6 | + - "10" |
5 | 7 |
|
6 | | -sudo: false |
7 | | -dist: trusty |
| 8 | +dist: xenial |
8 | 9 |
|
9 | 10 | addons: |
10 | 11 | chrome: stable |
11 | 12 |
|
12 | 13 | cache: |
13 | | - directories: |
14 | | - - $HOME/.npm |
| 14 | + yarn: true |
15 | 15 |
|
16 | 16 | env: |
17 | 17 | global: |
18 | 18 | # See https://git.io/vdao3 for details. |
19 | 19 | - JOBS=1 |
20 | | - matrix: |
21 | | - - EMBER_TRY_SCENARIO=ember-lts-2.8 |
22 | | - - EMBER_TRY_SCENARIO=ember-lts-2.12 |
23 | | - - EMBER_TRY_SCENARIO=ember-lts-2.16 |
24 | | - - EMBER_TRY_SCENARIO=ember-lts-2.18 |
25 | | - - EMBER_TRY_SCENARIO=ember-lts-3.4 |
26 | | - - EMBER_TRY_SCENARIO=ember-release |
27 | | - - EMBER_TRY_SCENARIO=ember-beta |
28 | | - - EMBER_TRY_SCENARIO=ember-canary |
29 | | - - EMBER_TRY_SCENARIO=ember-default |
30 | | - - EMBER_TRY_SCENARIO=ember-default-with-jquery |
31 | | - |
32 | | -matrix: |
| 20 | + |
| 21 | +branches: |
| 22 | + only: |
| 23 | + - master |
| 24 | + # npm version tags |
| 25 | + - /^v\d+\.\d+\.\d+/ |
| 26 | + |
| 27 | +jobs: |
33 | 28 | fast_finish: true |
34 | 29 | allow_failures: |
35 | 30 | - env: EMBER_TRY_SCENARIO=ember-canary |
36 | 31 |
|
| 32 | + include: |
| 33 | + # runs linting and tests with current locked deps |
| 34 | + - stage: "Tests" |
| 35 | + name: "Tests" |
| 36 | + script: |
| 37 | + - yarn lint |
| 38 | + - yarn test:ember |
| 39 | + |
| 40 | + - stage: "Additional Tests" |
| 41 | + name: "Floating Dependencies" |
| 42 | + install: |
| 43 | + - yarn install --no-lockfile --non-interactive |
| 44 | + script: |
| 45 | + - yarn test:ember |
| 46 | + |
| 47 | + # we recommend new addons test the current and previous LTS |
| 48 | + # as well as latest stable release (bonus points to beta/canary) |
| 49 | + - env: EMBER_TRY_SCENARIO=ember-lts-3.16 |
| 50 | + - env: EMBER_TRY_SCENARIO=ember-lts-3.20 |
| 51 | + - env: EMBER_TRY_SCENARIO=ember-release |
| 52 | + - env: EMBER_TRY_SCENARIO=ember-beta |
| 53 | + - env: EMBER_TRY_SCENARIO=ember-canary |
| 54 | + - env: EMBER_TRY_SCENARIO=ember-default-with-jquery |
| 55 | + - env: EMBER_TRY_SCENARIO=ember-classic |
| 56 | + - env: EMBER_TRY_SCENARIO=embroider-safe |
| 57 | + - env: EMBER_TRY_SCENARIO=embroider-optimized |
| 58 | + |
37 | 59 | before_install: |
38 | | - - npm config set spin false |
39 | | - - npm install -g npm@4 |
40 | | - - npm --version |
| 60 | + - curl -o- -L https://yarnpkg.com/install.sh | bash |
| 61 | + - export PATH=$HOME/.yarn/bin:$PATH |
41 | 62 |
|
42 | 63 | script: |
43 | | - # Usually, it's ok to finish the test scenario without reverting |
44 | | - # to the addon's original dependency state, skipping "cleanup". |
45 | | - - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup |
| 64 | + - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO |
0 commit comments