Skip to content

Commit 0718ee0

Browse files
committed
ci: add separate CI track for Angular 4
1 parent c8807c1 commit 0718ee0

13 files changed

+69
-25
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ matrix:
5454
before_script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then exit 0; fi
5555
script: node tests/run_e2e.js --ng2 "--glob=tests/{build,test,misc}/**"
5656
env: ng2
57+
- node_js: "6"
58+
os: linux
59+
before_script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then exit 0; fi
60+
script: node tests/run_e2e.js --ng4 "--glob=tests/{build,test,misc}/**"
61+
env: ng4
5762
- node_js: "6"
5863
os: linux
5964
before_script: if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then exit 0; fi

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-app-shell-with-schematic.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export default function () {
1010
return Promise.resolve();
1111
}
1212

13-
// Skip in nightly tests.
14-
if (getGlobalVariable('argv').nightly) {
13+
// Skip this test in Angular 2/4.
14+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
1515
return Promise.resolve();
1616
}
1717

tests/e2e/tests/build/build-app-shell.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export default function () {
1313
return Promise.resolve();
1414
}
1515

16+
// Skip this test in Angular 2/4.
17+
if (getGlobalVariable('argv').ng2 || getGlobalVariable('argv').ng4) {
18+
return Promise.resolve();
19+
}
20+
1621
let platformServerVersion = readNgVersion();
1722

1823
if (getGlobalVariable('argv').nightly) {

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

0 commit comments

Comments
 (0)