Skip to content

Commit ca59d14

Browse files
Merge pull request #52 from angular/master
Update upstream
2 parents 8758b37 + 37b9882 commit ca59d14

File tree

7 files changed

+68
-37
lines changed

7 files changed

+68
-37
lines changed

.travis.yml

Lines changed: 52 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,80 @@ env:
1212
global:
1313
- DBUS_SESSION_BUS_ADDRESS=/dev/null
1414

15+
16+
matrix:
17+
allow_failures:
18+
- env: nightly
19+
- env: ng2
20+
- node_js: "7"
21+
- node_js: "8"
22+
23+
1524
matrix:
1625
fast_finish: true
1726
allow_failures:
18-
- env: NODE_SCRIPT="tests/run_e2e.js --nightly --glob=tests/{build,test,misc}/**"
19-
- env: NODE_SCRIPT="tests/run_e2e.js --ng2 --glob=tests/{build,test,misc}/**"
27+
- env: nightly
28+
- env: ng2
2029
- node_js: "7"
2130
- node_js: "8"
2231
include:
32+
- stage: build
33+
script: npm run lint
34+
env: lint
35+
- script: npm run build
36+
env: build
37+
38+
- stage: test
39+
script: npm run test
40+
env: test
2341
- node_js: "6"
2442
os: linux
25-
env: SCRIPT=lint
26-
- node_js: "6"
27-
os: linux
28-
env: SCRIPT=build
29-
- node_js: "6"
30-
os: linux
31-
env: SCRIPT=test
32-
- node_js: "6"
33-
os: linux
34-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
43+
script: node tests/run_e2e.js "--glob=tests/build/**"
44+
env: build
3545
- node_js: "6"
3646
os: linux
37-
env: NODE_SCRIPT="tests/run_e2e.js --ignore=**/tests/build/**"
47+
script: travis_wait 120 node tests/run_e2e.js "--ignore=**/tests/build/**"
48+
env: e2e
3849
- node_js: "6"
3950
os: linux
40-
env: NODE_SCRIPT="tests/run_e2e.js --eject --glob=tests/build/**"
51+
script: node tests/run_e2e.js --eject "--glob=tests/build/**"
52+
env: eject
4153

4254
# Optional builds.
4355
- node_js: "6"
4456
os: linux
45-
env: NODE_SCRIPT="tests/run_e2e.js --ng2 --glob=tests/{build,test,misc}/**"
57+
script: node tests/run_e2e.js --ng2 "--glob=tests/{build,test,misc}/**"
58+
env: ng2
4659
- node_js: "6"
4760
os: linux
48-
env: NODE_SCRIPT="tests/run_e2e.js --nightly --glob=tests/{build,test,misc}/**"
61+
script: node tests/run_e2e.js "--nightly --glob=tests/{build,test,misc}/**"
62+
env: nightly
4963
- node_js: "7"
5064
os: linux
51-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/{build,test,misc}/**"
65+
script: node tests/run_e2e.js "--glob=tests/{build,test,misc}/**"
66+
env: node7
5267
- node_js: "8"
5368
os: linux
54-
env: NODE_SCRIPT="tests/run_e2e.js --glob=tests/build/**"
69+
script: node tests/run_e2e.js "--glob=tests/build/**"
70+
env: node8
71+
72+
- stage: deploy
73+
script: skip
74+
env: builds
75+
deploy:
76+
- provider: script
77+
script: node scripts/git-builds.js
78+
on:
79+
all_branches: true
80+
- stage: deploy
81+
script: skip
82+
env: publish
83+
deploy:
84+
- provider: script
85+
script: node scripts/publish/publish.js
86+
on:
87+
tags: true
88+
5589

5690
before_install:
5791
# Use a virtual display.
@@ -67,10 +101,6 @@ before_install:
67101
install:
68102
- yarn --frozen-lockfile
69103

70-
script:
71-
- if [[ "$SCRIPT" ]]; then npm run-script $SCRIPT; fi
72-
- if [[ "$NODE_SCRIPT" ]]; then node $NODE_SCRIPT; fi
73-
74104
env:
75105
global:
76106
# GITHUB_ACCESS_TOKEN=<github token, a personal access token of the angular-builds account, account access in valentine>
@@ -80,12 +110,3 @@ env:
80110
- secure: "QDefZm9p3/SQ6ts0WVkzwr1qv4tvxpu5hB5ptTGQwRP02oPQumebE+uazSjhrbMf9zCnlrQSaCV7VxMdqQ0GUdAQ+gZz4mr/6SyT1eThTfgqq4GFX24M5dlcWW4rB6ot5NICPnsvASBVDn4IkapTY135/s5fqp2TeDJmAH8xMxKRbsG/b4+KCvhjpO7WJMZumkrwsWFrtAh1zFjrXoHwEySYPkwZceJmSi7GPmjZLodMmSkMxi4vuOAgrx6kWPTuCszKGXm7+Y1UbjeSSoBYLt2c19oy2dJKrER9sSx8/1yeV1C2JJ/cabYBktcn1svUh0lo1j1YOWtEXaIv7SRU694EtWxiuaL8iIcABHdoaLt/BZ34MLG0RdvFu0i2Bv5HxGWQg5TB/Jy502dqkep5ILofF80Ya9NTeapIPSbI3IEWcsCCw+t0pv/91XXU7mduDwtvBtzwxC4nKS4PITjrFTSrsr0wiLagW6ZCbKMrUitEFgedvsa3Tf8wVtt1s/Z7W2iLt81TTVdCei+46PtLIG3k9R1J78WmPLsGJ3uMXo/Cgc7q5PN66Dx6V1RZMBbS9xG0OPxd8a/6Lj94u6QWS1x50osVPEqUqGmT2tWP5fabrDKLUnVLm2Y0O1eBnnu9ew+ccCKou0FCqlx5ppRekBIaMibHbmgahRLMgNbaJR0="
81111

82112

83-
deploy:
84-
- provider: script
85-
script: node scripts/git-builds.js
86-
on:
87-
all_branches: true
88-
- provider: script
89-
script: node scripts/publish/publish.js
90-
on:
91-
tags: true

tests/e2e/setup/500-create-project.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ export default function() {
6666
});
6767
}
6868
})
69+
.then(() => updateJsonFile('.angular-cli.json', configJson => {
70+
// Auto-add some flags to ng commands that build or test the app.
71+
// --no-progress disables progress logging, which in CI logs thousands of lines.
72+
// --no-sourcemaps disables sourcemaps, making builds faster.
73+
// We add these flags before other args so that they can be overriden.
74+
// e.g. `--no-sourcemaps --sourcemaps` will still generate sourcemaps.
75+
const defaults = configJson.defaults;
76+
defaults.build = {
77+
sourcemaps: false,
78+
progress: false
79+
};
80+
}))
6981
.then(() => silentNpm('install'))
7082
// Force sourcemaps to be from the root of the filesystem.
7183
.then(() => updateTsConfig(json => {

tests/e2e/tests/build/sourcemap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function() {
1010
return Promise.resolve();
1111
}
1212

13-
return ng('build')
13+
return ng('build', '--sourcemaps')
1414
.then(() => expectFileToExist('dist/main.bundle.js.map'))
1515

1616
.then(() => ng('build', '--no-sourcemap'))

tests/e2e/tests/build/vendor-chunk-symlink-node-module.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export default function() {
99
.then(() => symlinkFile('../node_modules', 'node_modules', 'dir'))
1010
.then(() => ng('build'))
1111
.then(() => expectFileToExist('dist/vendor.bundle.js'))
12-
.then(() => expectFileToExist('dist/vendor.bundle.js.map'))
1312
// Cleanup
1413
.then(() => {
1514
return deleteFile('node_modules')

tests/e2e/tests/test/test-fail-watch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const karmaGoodRegEx = /Executed 3 of 3 SUCCESS \(\d+\.\d+ secs/;
1212

1313
export default function () {
1414
let originalSpec: string;
15-
return silentExecAndWaitForOutputToMatch('ng', ['test', '--no-progress'], karmaGoodRegEx)
15+
return silentExecAndWaitForOutputToMatch('ng', ['test'], karmaGoodRegEx)
1616
.then(() => readFile('src/app/app.component.spec.ts'))
1717
.then((data) => originalSpec = data)
1818
// Trigger a failed rebuild, which shouldn't run tests again.

tests/e2e/utils/process.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ export function silentExecAndWaitForOutputToMatch(cmd: string, args: string[], m
139139

140140
let npmInstalledEject = false;
141141
export function ng(...args: string[]) {
142-
// Auto-add --no-progress to commands that build the app, otherwise we get thousands of lines.
143142
if (['build', 'serve', 'test', 'e2e', 'xi18n'].indexOf(args[0]) != -1) {
144143
// If we have the --eject, use webpack for the test.
145144
const argv = getGlobalVariable('argv');
@@ -156,7 +155,7 @@ export function ng(...args: string[]) {
156155
.then(() => _exec({silent: true}, 'node_modules/.bin/webpack', []));
157156
}
158157

159-
return silentNg(...args, '--no-progress');
158+
return silentNg(...args);
160159
} else {
161160
return _exec({}, 'ng', args);
162161
}

tests/e2e/utils/project.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function updateTsConfig(fn: (json: any) => any | void) {
2626

2727
export function ngServe(...args: string[]) {
2828
return silentExecAndWaitForOutputToMatch('ng',
29-
['serve', '--no-progress', ...args],
29+
['serve', ...args],
3030
/webpack: bundle is now VALID|webpack: Compiled successfully./);
3131
}
3232

0 commit comments

Comments
 (0)