Skip to content

Commit beb7514

Browse files
committed
ci: trim appveyor test suite
1 parent 5f4c87a commit beb7514

40 files changed

+236
-9
lines changed

.appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ install:
1212
test_script:
1313
- node --version
1414
- yarn --version
15-
- yarn test
16-
- node tests\run_e2e.js
15+
- node tests\run_e2e.js --appveyor
1716

1817
build: off
1918

2019
cache:
2120
- node_modules
22-
- "%LOCALAPPDATA%/Yarn"
21+
- "%LOCALAPPDATA%/Yarn"

tests/e2e/tests/build/base-href.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import {ng} from '../../utils/process';
22
import {expectFileToMatch} from '../../utils/fs';
3+
import {getGlobalVariable} from '../../utils/env';
34

45

56
export default function() {
7+
// Skip this in Appveyor tests.
8+
if (getGlobalVariable('argv').appveyor) {
9+
return Promise.resolve();
10+
}
11+
612
return ng('build', '--base-href', '/myUrl')
713
.then(() => expectFileToMatch('dist/index.html', /<base href="\/myUrl">/));
814
}

tests/e2e/tests/build/chunk-hash.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import * as fs from 'fs';
44
import {ng} from '../../utils/process';
55
import {writeFile} from '../../utils/fs';
66
import {addImportToModule} from '../../utils/ast';
7+
import {getGlobalVariable} from '../../utils/env';
78

89
const OUTPUT_RE = /(main|polyfills|vendor|inline|styles|\d+)\.[a-z0-9]+\.(chunk|bundle)\.(js|css)$/;
910

@@ -44,6 +45,12 @@ function validateHashes(
4445
}
4546

4647
export default function() {
48+
// Skip this in Appveyor tests.
49+
if (getGlobalVariable('argv').appveyor) {
50+
return Promise.resolve();
51+
}
52+
53+
4754
let oldHashes: Map<string, string>;
4855
let newHashes: Map<string, string>;
4956
// First, collect the hashes.

tests/e2e/tests/build/css-urls.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
writeMultipleFiles
88
} from '../../utils/fs';
99
import { expectToFail } from '../../utils/utils';
10+
import { getGlobalVariable } from '../../utils/env';
1011

1112
const imgSvg = `
1213
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
@@ -15,6 +16,11 @@ const imgSvg = `
1516
`;
1617

1718
export default function () {
19+
// Skip this in Appveyor tests.
20+
if (getGlobalVariable('argv').appveyor) {
21+
return Promise.resolve();
22+
}
23+
1824
return Promise.resolve()
1925
// Verify absolute/relative paths in global/component css.
2026
.then(() => writeMultipleFiles({

tests/e2e/tests/build/delete-output-path.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import {deleteFile, expectFileToExist} from '../../utils/fs';
44
import {getGlobalVariable} from '../../utils/env';
55

66
export default function() {
7+
// Skip this in Appveyor tests.
8+
if (getGlobalVariable('argv').appveyor) {
9+
return Promise.resolve();
10+
}
11+
712
// Skip this in ejected tests.
813
if (getGlobalVariable('argv').eject) {
914
return Promise.resolve();

tests/e2e/tests/build/deploy-url.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import { ng } from '../../utils/process';
22
import { expectFileToMatch, writeMultipleFiles } from '../../utils/fs';
33
import { updateJsonFile } from '../../utils/project';
4+
import { getGlobalVariable } from '../../utils/env';
45
import { stripIndents } from 'common-tags';
56

67

78
export default function () {
9+
// Skip this in Appveyor tests.
10+
if (getGlobalVariable('argv').appveyor) {
11+
return Promise.resolve();
12+
}
13+
14+
815
return Promise.resolve()
916
.then(() => writeMultipleFiles({
1017
'src/styles.css': 'div { background: url("./assets/more.svg"); }',

tests/e2e/tests/build/filename.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ import {ng} from '../../utils/process';
22
import {expectFileToExist} from '../../utils/fs';
33
import {updateJsonFile} from '../../utils/project';
44
import {copyFile} from '../../utils/fs';
5+
import {getGlobalVariable} from '../../utils/env';
56

67

78
export default function() {
9+
// Skip this in Appveyor tests.
10+
if (getGlobalVariable('argv').appveyor) {
11+
return Promise.resolve();
12+
}
13+
814
return Promise.resolve()
915
.then(() => copyFile('src/index.html', 'src/config-index.html'))
1016
.then(() => updateJsonFile('.angular-cli.json', configJson => {

tests/e2e/tests/build/json.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ import {getGlobalVariable} from '../../utils/env';
55

66

77
export default function() {
8+
// Skip this in Appveyor tests.
9+
if (getGlobalVariable('argv').appveyor) {
10+
return Promise.resolve();
11+
}
12+
813
// Skip this in ejected tests.
914
if (getGlobalVariable('argv').eject) {
1015
return Promise.resolve();

tests/e2e/tests/build/module-id.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { ng } from '../../utils/process';
2-
import { replaceInFile } from "../../utils/fs";
2+
import { replaceInFile } from '../../utils/fs';
3+
import { getGlobalVariable } from '../../utils/env';
34

45

56
export default function() {
7+
// Skip this in Appveyor tests.
8+
if (getGlobalVariable('argv').appveyor) {
9+
return Promise.resolve();
10+
}
11+
612
return Promise.resolve()
713
.then(() => replaceInFile('src/app/app.component.ts',
814
'@Component({',

tests/e2e/tests/build/no-implicit-any.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import {updateTsConfig} from '../../utils/project';
22
import {ng} from '../../utils/process';
3+
import {getGlobalVariable} from '../../utils/env';
34

45

56
export default function() {
7+
// Skip this in Appveyor tests.
8+
if (getGlobalVariable('argv').appveyor) {
9+
return Promise.resolve();
10+
}
11+
612
return updateTsConfig(json => {
713
json['compilerOptions']['noImplicitAny'] = true;
814
})

0 commit comments

Comments
 (0)