Skip to content

Commit 7707216

Browse files
test(downstream): test downstreams (but do not fail travis)
1 parent 070afd4 commit 7707216

File tree

4 files changed

+28
-44
lines changed

4 files changed

+28
-44
lines changed

.gitignore

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# common
22
node_modules
3-
downstream_projects
4-
.DS_Store
3+
**/.*
54
*~
6-
.tscache
7-
.baseDir.ts
85

96
# webstorm files
10-
.idea
117
idea-out
128
*.iml
139
*.ipr
@@ -17,4 +13,3 @@ _doc
1713
_bundles
1814
lib
1915
lib-esm
20-
stats.html

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ test
88
scripts
99

1010
node_modules
11-
downstream_projects
1211

1312
tslint.json
1413
tsconfig.json

.travis.yml

Lines changed: 27 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,40 @@
11
language: node_js
22
node_js: '8.9.1'
33

4-
cache:
5-
directories:
6-
- node_modules
7-
- downstream_projects
8-
9-
before_install: npm i -g yarn yalc greenkeeper-lockfile@1
4+
before_install: yarn global add greenkeeper-lockfile@1 yalc
105
install: yarn --check-files
116

12-
before_script: greenkeeper-lockfile-update
7+
before_script: greenkeeper-lockfile-update && greenkeeper-lockfile-upload
138
script:
14-
- echo "CORE_BRANCH = x${CORE_BRANCH}x";
15-
- >
16-
if [ "x${CORE_BRANCH}x" != "xx" ] ; then
17-
echo "Installing @uirouter/core from ${CORE_BRANCH}" && \
18-
git clone --depth=10 --branch="${CORE_BRANCH}" https://github.com/ui-router/core.git ui-router-core && \
19-
pushd ui-router-core && \
20-
yarn && \
21-
yarn build && \
22-
yalc publish && \
23-
popd && \
24-
yalc add @uirouter/core ;
25-
fi
26-
- npm run travis
27-
after_script: greenkeeper-lockfile-upload
9+
# When CORE_BRANCH env variable is set, it will fetch, build, and test using that branch of @uirouter/core
10+
- if [ "x${CORE_BRANCH}x" != "xx" ] ; then ./node_modules/.bin/publish_yalc_package .downstream_cache/core https://github.com/ui-router/core.git && yalc add @uirouter/core ; fi
11+
# If DOWNSTREAM or DOWNSTREAM_PKGS is set, run downstream packages' tests instead
12+
- if [ "x${DOWNSTREAM_PKGS}${DOWNSTREAM}x" != "xx" ] ; then npm run test:downstream ; else tsc && npm run travis ; fi
2813

29-
git:
30-
depth: 10
14+
env:
15+
global:
16+
secure: SwGGqOsUVNWKRjWyT3Nn+8NyCR5JQf9ep2yPJgAqExcWjjSLSPuj7WekLj8e5Aj8TUJZ3gMOQ1Pcs2WKBn8eLn/UxOAUqY259pGeHwd2T/28dt9bZO4Hzixr71fchbBwp+6ZLb8Mi/b4tsAbDX3Qz6eIxZ+h+xSNSoidOIOLmahTsKe8XI6YJllc8vY25v03tDS8M0bIOSx7Ggl75Hn1usfXEcgLbAcYhkttvezKQq6O78hut0v83FBkJXBtcDDIcHjL4o51jvYzKHhZbfAZ1eoXB03x4p6ZkFFPrh9kze173J8eN9DTGojd+ChiFqCU3O5vpkgRI61tfXoA2iT2tonCBgosO380wvE/lg4uTR8nZc+ijZPHk08MEgA44X6uYabAxntt/F731lrNKjxDU0skVlY9v3CdMsUvycjwDLz4VV4IcLwEBnQUAwVIDhQ9YtuBZGIQpfJFivqvUcFlcySq6S/GRj5PlcUJUWkw8DiWbBPLmf+bG4nACl1mpj+M73rcE6vB5q4BYZdmuGqz2T+ebdNk5U4whENeASSkBYfc2FeDB6byjKtP3vljKDErwC9dZy6qzvt8EgDBzc6rr6FgYdemAx/qXNTcVr82nPQa6BOwn3M12yBBOjQi/KkrgIifqA45so8IxXZdpUinLdKPDqpKoCrXaaVqB5kfzjU=
17+
matrix:
18+
- CORE_BRANCH=
19+
- CORE_BRANCH=master
20+
- CORE_BRANCH=master UPSTREAM_PKGS=@uirouter/core DOWNSTREAM=true
21+
- DOWNSTREAM=true
22+
23+
matrix:
24+
fast_finish: true
25+
allow_failures:
26+
- env: CORE_BRANCH=
27+
- env: DOWNSTREAM=true
28+
- env: CORE_BRANCH=master UPSTREAM_PKGS=@uirouter/core DOWNSTREAM=true
3129

3230
notifications:
3331
slack:
3432
secure: e/lVSx31fq3lZqmG2NcL/b5vkYTHWEhuquLiRxqmLGcwOcpMU65ZmzQIqGvB8X1/WVT+A9pxPQL1E/iddC2IBUYelARsENUhZO6DbamoSaTzd5XvUKoXS3XF2GG7gf95pnXOYMJ6Jx+NE170dQ8EPAGJfjxZXX35KAz7DgQjzCG0iMNTaL1W4v8BmxmK7GaJuxERE6SzkxepeRbsHIlvDPlvMFCSn3TIIPYNAqkGEHgxJfmfnQu8V5Q9bJgi34wdqETgZfg1F8MOcvEwmcF9DazlAUI7Ie9A3YbbDKrWrNhVe7ylkGc2VKXoHZvk6etGCAH40BLDZ5uXCFHYzMAAoLo8pJUXoQ5g6Vq0jZiVY4y2LBJEhOnMcXrTOBDzKK9mlkGHAldgVZtgXvvf4WpviGgg2z2CuZBVkvlsZ2HMbpESxxrpR95kAINlnDEFJCCtcq7x4/VtI/AZ8+L3CSGKZE1/gugs5ShbjNtf0wuyWH9oIH4ZWlAVBuX21jhoexvKoE3kpGSypuUumFbkkESQ0+I6HnmvT9AkWs5KIpjScqklEEziVF3xNEh2K/Ccr/D1oH4KmfOUpx7WCgpFxaStfQhIcbdFntH823dQ+2BXgfVaC3VHZClUfvbmeHlsdDPLrhy98z9MKByA76IAE5/U52vIlFPO+ha6WitMj+XG2g0=
3533

36-
matrix:
37-
allow_failures:
38-
- env: CORE_BRANCH=
34+
sudo: false
3935

40-
env:
41-
global:
42-
secure: SwGGqOsUVNWKRjWyT3Nn+8NyCR5JQf9ep2yPJgAqExcWjjSLSPuj7WekLj8e5Aj8TUJZ3gMOQ1Pcs2WKBn8eLn/UxOAUqY259pGeHwd2T/28dt9bZO4Hzixr71fchbBwp+6ZLb8Mi/b4tsAbDX3Qz6eIxZ+h+xSNSoidOIOLmahTsKe8XI6YJllc8vY25v03tDS8M0bIOSx7Ggl75Hn1usfXEcgLbAcYhkttvezKQq6O78hut0v83FBkJXBtcDDIcHjL4o51jvYzKHhZbfAZ1eoXB03x4p6ZkFFPrh9kze173J8eN9DTGojd+ChiFqCU3O5vpkgRI61tfXoA2iT2tonCBgosO380wvE/lg4uTR8nZc+ijZPHk08MEgA44X6uYabAxntt/F731lrNKjxDU0skVlY9v3CdMsUvycjwDLz4VV4IcLwEBnQUAwVIDhQ9YtuBZGIQpfJFivqvUcFlcySq6S/GRj5PlcUJUWkw8DiWbBPLmf+bG4nACl1mpj+M73rcE6vB5q4BYZdmuGqz2T+ebdNk5U4whENeASSkBYfc2FeDB6byjKtP3vljKDErwC9dZy6qzvt8EgDBzc6rr6FgYdemAx/qXNTcVr82nPQa6BOwn3M12yBBOjQi/KkrgIifqA45so8IxXZdpUinLdKPDqpKoCrXaaVqB5kfzjU=
43-
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
46-
- CORE_BRANCH=master
47-
# If CORE_BRANCH is empty, it will use the @uirouter/core from npm dependencies
48-
# (as specified in package.json)
49-
- CORE_BRANCH=
36+
cache:
37+
yarn: true
38+
directories:
39+
- node_modules
40+
- .downstream_cache

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"fixmaps:bundle": "tweak_sourcemap_paths -a --include '_bundles/**/*.js.map'",
1111
"build": "run-s compile bundle fixmaps:*",
1212
"release": "release --deps @uirouter/core",
13-
"travis": "npm run build && npm run noimplicitany && npm run test",
1413
"test": "karma start",
1514
"test:downstream": "npm run build && test_downstream_projects",
1615
"noimplicitany": "tsc --noEmit --noImplicitAny --skipLibCheck --moduleResolution node --target es6 test/noimplicitany.ts",

0 commit comments

Comments
 (0)