Skip to content

Commit b5932ef

Browse files
committed
ci: add separate CI track for Angular 4
1 parent 8a63396 commit b5932ef

File tree

11 files changed

+57
-40
lines changed

11 files changed

+57
-40
lines changed

.travis.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,6 @@ matrix:
4444
script: node tests/run_e2e.js --nb-shards=4 --shard=3 --nosilent
4545
env: e2e-3
4646

47-
- node_js: "6"
48-
os: linux
49-
script: node tests/run_e2e.js --nb-shards=4 --shard=0 --nosilent --nightly
50-
env: nightly-0
51-
- node_js: "6"
52-
os: linux
53-
script: node tests/run_e2e.js --nb-shards=4 --shard=1 --nosilent --nightly
54-
env: nightly-1
55-
- node_js: "6"
56-
os: linux
57-
script: node tests/run_e2e.js --nb-shards=4 --shard=2 --nosilent --nightly
58-
env: nightly-2
59-
- node_js: "6"
60-
os: linux
61-
script: node tests/run_e2e.js --nb-shards=4 --shard=3 --nosilent --nightly
62-
env: nightly-3
63-
6447
- node_js: "6"
6548
os: linux
6649
script: node tests/run_e2e.js --eject "--glob=tests/build/**"

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
updateTsConfig,
66
updateJsonFile,
77
useNg2,
8+
useNg4,
89
useSha,
910
useCIChrome,
1011
useCIDefaults,
@@ -45,6 +46,7 @@ export default function() {
4546
.then(() => useCIChrome())
4647
.then(() => useCIDefaults())
4748
.then(() => argv['ng2'] ? useNg2() : Promise.resolve())
49+
.then(() => argv['ng4'] ? useNg4() : Promise.resolve())
4850
.then(() => argv.nightly || argv['ng-sha'] ? useSha() : Promise.resolve())
4951
// npm link on Circle CI is very noisy.
5052
.then(() => silentNpm('install'))

tests/e2e/tests/build/aot/exclude.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export default function () {
77
// Disable parts of it in webpack tests.
88
const ejected = getGlobalVariable('argv').eject;
99

10-
// Skip this in ng5 tests, it only happens in ng2/4.
11-
// This check should be changed once ng5 because the default.
12-
if (getGlobalVariable('argv').nightly) {
10+
// This test is only for Angular 2/4 projects.
11+
if (!getGlobalVariable('argv').ng2 && !getGlobalVariable('argv').ng4) {
1312
return Promise.resolve();
1413
}
1514

tests/e2e/tests/build/build-errors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ export default function () {
1515
if (process.platform.startsWith('win')) {
1616
return Promise.resolve();
1717
}
18+
1819
// Skip this in ejected tests.
1920
if (getGlobalVariable('argv').eject) {
2021
return Promise.resolve();
2122
}
2223

23-
// Skip in non-nightly tests. Switch this check around when ng5 is out.
24-
if (!getGlobalVariable('argv').nightly) {
24+
// Skip this test in Angular 2/4.
25+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
2526
return Promise.resolve();
2627
}
2728

tests/e2e/tests/build/build-optimizer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export default function () {
99
.then(() => expectToFail(() => expectFileToExist('dist/vendor.js')))
1010
.then(() => expectToFail(() => expectFileToMatch('dist/main.js', /\.decorators =/)))
1111
.then(() => {
12-
// Check if build optimizer is on by default in ng5 prod builds
13-
// This check should be changed once ng5 because the default.
14-
if (!getGlobalVariable('argv').nightly) {
12+
// Skip this part of the test in Angular 2/4.
13+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
1514
return Promise.resolve();
1615
}
1716

17+
// Check if build optimizer is on by default in ng5 prod builds
1818
return Promise.resolve()
1919
.then(() => ng('build', '--prod'))
2020
.then(() => expectToFail(() => expectFileToExist('dist/vendor.js')))

tests/e2e/tests/build/platform-server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ export default function () {
2626

2727
let platformServerVersion = readNgVersion();
2828

29-
if (getGlobalVariable('argv').nightly) {
30-
platformServerVersion = 'github:angular/platform-server-builds';
29+
// Skip this test in Angular 2/4.
30+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
31+
return Promise.resolve();
3132
}
3233

3334
return Promise.resolve()

tests/e2e/tests/build/rebuild-error.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export default function () {
2626
return Promise.resolve();
2727
}
2828

29-
// Skip in non-nightly tests. Switch this check around when ng5 is out.
30-
if (!getGlobalVariable('argv').nightly) {
29+
// Skip this test in Angular 2/4.
30+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
3131
return Promise.resolve();
3232
}
3333

tests/e2e/tests/build/rebuild-ngfactories.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export default function () {
7070
}
7171
})
7272
.then(() => {
73-
// Skip in non-nightly tests. Switch this check around when ng5 is out.
74-
if (!getGlobalVariable('argv').nightly) {
73+
// Skip this part of the test in Angular 2/4.
74+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
7575
return Promise.resolve();
7676
}
7777

tests/e2e/tests/i18n/build-locale.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ import { expectToFail } from '../../utils/utils';
55

66

77
export default function () {
8-
// Check if register locale works in ng5 prod builds
9-
// This check should be changed once ng5 because the default.
10-
if (!getGlobalVariable('argv').nightly) {
8+
// Skip this test in Angular 2/4.
9+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
1110
return Promise.resolve();
1211
}
1312

tests/e2e/tests/misc/typescript-warning.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ export default function () {
77
// Update as needed.
88
let unsupportedTsVersion = '2.5';
99

10-
// TODO: re-enable for ng5, adjust as needed. This test fails on ng5 because the 2.5 is supported.
11-
// When ng5 because the default this test will need to be adjusted to use 2.3 as the unsupported
12-
// version, and to disable the experimental angular compiler (transforms need 2.4 minimum).
13-
if (getGlobalVariable('argv').nightly) {
14-
return;
10+
// Skip this test in Angular 2/4.
11+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
12+
return Promise.resolve();
1513
}
1614

1715
return Promise.resolve()

0 commit comments

Comments
 (0)