|
1 | 1 | language: node_js
|
2 |
| -node_js: |
3 |
| -- 8.9.1 |
4 |
| - |
5 |
| -before_install: |
6 |
| -- curl -o- -L https://yarnpkg.com/install.sh | bash |
7 |
| -- export PATH="$HOME/.yarn/bin:$PATH" |
8 |
| -- yarn global add greenkeeper-lockfile@1 yalc |
| 2 | +node_js: '8.9.1' |
9 | 3 |
|
10 | 4 | cache:
|
11 | 5 | yarn: true
|
12 | 6 | directories:
|
13 | 7 | - downstream_projects
|
14 | 8 | - node_modules
|
| 9 | + - ui-router-core |
| 10 | + |
| 11 | +before_install: |
| 12 | +- curl -o- -L https://yarnpkg.com/install.sh | bash |
| 13 | +- export PATH="$HOME/.yarn/bin:$PATH" |
| 14 | +- yarn global add greenkeeper-lockfile@1 yalc |
15 | 15 |
|
16 | 16 | install: yarn --check-files
|
17 | 17 |
|
18 |
| -before_script: greenkeeper-lockfile-update |
| 18 | +before_script: greenkeeper-lockfile-update && greenkeeper-lockfile-upload |
19 | 19 |
|
20 | 20 | script:
|
21 |
| -- echo "CORE_BRANCH = x${CORE_BRANCH}x"; |
22 |
| - # Fetch and build the @uirouter/core branch from github, then install it |
23 |
| -- > |
24 |
| - if [ "x${CORE_BRANCH}x" != "xx" ] ; then |
25 |
| - echo "Installing @uirouter/core from ${CORE_BRANCH}" && \ |
26 |
| - git clone --depth=10 --branch="${CORE_BRANCH}" https://github.com/ui-router/core.git ui-router-core && \ |
27 |
| - pushd ui-router-core && \ |
28 |
| - yarn && \ |
29 |
| - yarn build && \ |
30 |
| - yalc publish && \ |
31 |
| - popd && \ |
32 |
| - yarn add @uirouter/core ; |
33 |
| - fi |
34 |
| -- tsc && npm test |
35 |
| - |
36 |
| -after_script: greenkeeper-lockfile-upload |
37 |
| - |
38 |
| -matrix: |
39 |
| - allow_failures: |
40 |
| - - env: CORE_BRANCH= |
| 21 | +# If CORE_BRANCH is set, fetch and build the @uirouter/core branch from github, then install it |
| 22 | +- if [ "x${CORE_BRANCH}x" != "xx" ] ; then ./node_modules/.bin/publish_yalc_package ui-router-core https://github.com/ui-router/core.git && yalc add @uirouter/core ; fi |
| 23 | +- if [ "x${DOWNSTREAM_PKGS}x" != "xx" ] ; then npm run test:downstream ; else tsc && npm test ; fi |
41 | 24 |
|
42 | 25 | env:
|
| 26 | + global: |
| 27 | + secure: TanWbkSRljYf0ENPiF3LDM+6RDYyUZoVIIQjUk9UDZ1MBvzEiqISB/zKSXSoYY1JNZpNcXgje2Sl08yGhAugRVodH+FJa/khSkXwRsZAlJuG8qPFAevW4gffvJvPAE7O0uy4jLyyu+Fi9dptdi1zDGsOps/Q+WURH9jWPGmQpj8= |
43 | 28 | matrix:
|
44 |
| - # CORE_BRANCH env variable specifies the branch of @uirouter/core to use during build/test |
45 |
| - # Each CORE_BRANCH listed here will trigger a SEPARATE job in travis |
| 29 | + # When CORE_BRANCH env variable is set, it will fetch, build, and test using that branch of @uirouter/core |
| 30 | + - CORE_BRANCH= |
46 | 31 | - CORE_BRANCH=master
|
| 32 | + - DOWNSTREAM_PKGS=sample-app-angularjs |
| 33 | + - DOWNSTREAM_PKGS=sample-app-angularjs CORE_BRANCH=master |
47 | 34 |
|
48 |
| - # If CORE_BRANCH is empty, it will use the @uirouter/core from npm dependencies |
49 |
| - # (as specified in package.json) |
50 |
| - - CORE_BRANCH= |
51 |
| - global: |
52 |
| - secure: TanWbkSRljYf0ENPiF3LDM+6RDYyUZoVIIQjUk9UDZ1MBvzEiqISB/zKSXSoYY1JNZpNcXgje2Sl08yGhAugRVodH+FJa/khSkXwRsZAlJuG8qPFAevW4gffvJvPAE7O0uy4jLyyu+Fi9dptdi1zDGsOps/Q+WURH9jWPGmQpj8= |
53 | 35 | sudo: false
|
54 | 36 |
|
55 |
| -git: |
56 |
| - depth: 3 |
| 37 | +matrix: |
| 38 | + fast_finish: true |
| 39 | + allow_failures: |
| 40 | + - env: CORE_BRANCH= |
| 41 | + - env: DOWNSTREAM_PKGS=sample-app-angularjs |
57 | 42 |
|
58 | 43 | notifications:
|
59 | 44 | slack:
|
|
0 commit comments