Skip to content

Commit 7e2b061

Browse files
committed
improved conditional tests
1 parent 32130e7 commit 7e2b061

File tree

21 files changed

+126
-66
lines changed

21 files changed

+126
-66
lines changed

angular/app-i18n/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test": "ng test",
1111
"lint": "ng lint",
1212
"e2e": "ng e2e",
13-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
13+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1414
},
1515
"private": true,
1616
"dependencies": {

angular/app-settings/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test": "ng test",
1111
"lint": "ng lint",
1212
"e2e": "ng e2e",
13-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
13+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1414
},
1515
"private": true,
1616
"dependencies": {

angular/components/basic-components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/components/component-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/components/component-providers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/components/component-queries/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/components/dynamic-content/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/components/lifecycle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/dependency-injection/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/directives/app-attach-directive/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/directives/app-upload-directive/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/directives/attribute-directives/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) --watch=false || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/directives/directive-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/directives/structural-directives/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/events/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/ng-docker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/pipes/custom-pipes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/pipes/pure-impure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/pipes/standard-pipes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

angular/plugins/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"lint": "ng lint",
1111
"e2e": "ng e2e",
12-
"test:ci": "../../if-changed.js && ng test --watch=false || echo 'skipping tests'"
12+
"test:ci": "../../if-changed.js && (npm install && ng test --watch=false) || echo 'skipping tests'"
1313
},
1414
"private": true,
1515
"dependencies": {

azure-pipelines.yml

Lines changed: 106 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ steps:
1717

1818
# angular/app-i18n
1919

20-
- task: Npm@1
21-
displayName: 'angular/app-i18n: install dependencies'
22-
inputs:
23-
command: 'install'
24-
workingDir: './angular/app-i18n'
25-
2620
- task: Npm@1
2721
displayName: 'angular/app-i18n: run unit tests'
2822
inputs:
@@ -32,12 +26,6 @@ steps:
3226

3327
# angular/app-settings
3428

35-
- task: Npm@1
36-
displayName: 'angular/app-settings: install dependencies'
37-
inputs:
38-
command: 'install'
39-
workingDir: './angular/app-settings'
40-
4129
- task: Npm@1
4230
displayName: 'angular/app-settings: run unit tests'
4331
inputs:
@@ -47,12 +35,6 @@ steps:
4735

4836
# angular/components/basic-components
4937

50-
- task: Npm@1
51-
displayName: 'angular/components/basic-components: install dependencies'
52-
inputs:
53-
command: 'install'
54-
workingDir: './angular/components/basic-components'
55-
5638
- task: Npm@1
5739
displayName: 'angular/components/basic-components: run unit tests'
5840
inputs:
@@ -62,12 +44,6 @@ steps:
6244

6345
# angular/components/component-host
6446

65-
- task: Npm@1
66-
displayName: 'angular/components/component-host: install dependencies'
67-
inputs:
68-
command: 'install'
69-
workingDir: './angular/components/component-host'
70-
7147
- task: Npm@1
7248
displayName: 'angular/components/component-host: run unit tests'
7349
inputs:
@@ -77,12 +53,6 @@ steps:
7753

7854
# angular/components/component-providers
7955

80-
- task: Npm@1
81-
displayName: 'angular/components/component-providers: install dependencies'
82-
inputs:
83-
command: 'install'
84-
workingDir: './angular/components/component-providers'
85-
8656
- task: Npm@1
8757
displayName: 'angular/components/component-providers: run unit tests'
8858
inputs:
@@ -92,12 +62,6 @@ steps:
9262

9363
# angular/components/component-queries
9464

95-
- task: Npm@1
96-
displayName: 'angular/components/component-queries: install dependencies'
97-
inputs:
98-
command: 'install'
99-
workingDir: './angular/components/component-queries'
100-
10165
- task: Npm@1
10266
displayName: 'angular/components/component-queries: run unit tests'
10367
inputs:
@@ -107,12 +71,6 @@ steps:
10771

10872
# angular/components/dynamic-content
10973

110-
- task: Npm@1
111-
displayName: 'angular/components/dynamic-content: install dependencies'
112-
inputs:
113-
command: 'install'
114-
workingDir: './angular/components/dynamic-content'
115-
11674
- task: Npm@1
11775
displayName: 'angular/components/dynamic-content: run unit tests'
11876
inputs:
@@ -123,14 +81,116 @@ steps:
12381
# angular/components/lifecycle
12482

12583
- task: Npm@1
126-
displayName: 'angular/components/lifecycle: install dependencies'
84+
displayName: 'angular/components/lifecycle: run unit tests'
12785
inputs:
128-
command: 'install'
86+
command: 'custom'
87+
customCommand: 'run test:ci'
12988
workingDir: './angular/components/lifecycle'
13089

90+
# angular/dependency-injection
91+
13192
- task: Npm@1
132-
displayName: 'angular/components/lifecycle: run unit tests'
93+
displayName: 'angular/dependency-injection: run unit tests'
13394
inputs:
13495
command: 'custom'
13596
customCommand: 'run test:ci'
136-
workingDir: './angular/components/lifecycle'
97+
workingDir: './angular/dependency-injection'
98+
99+
# angular/directives/app-attach-directive
100+
101+
- task: Npm@1
102+
displayName: 'angular/directives/app-attach-directive: run unit tests'
103+
inputs:
104+
command: 'custom'
105+
customCommand: 'run test:ci'
106+
workingDir: './angular/directives/app-attach-directive'
107+
108+
# angular/directives/app-upload-directive
109+
110+
- task: Npm@1
111+
displayName: 'angular/directives/app-upload-directive: run unit tests'
112+
inputs:
113+
command: 'custom'
114+
customCommand: 'run test:ci'
115+
workingDir: './angular/directives/app-upload-directive'
116+
117+
# angular/directives/attribute-directives
118+
119+
- task: Npm@1
120+
displayName: 'angular/directives/attribute-directives: run unit tests'
121+
inputs:
122+
command: 'custom'
123+
customCommand: 'run test:ci'
124+
workingDir: './angular/directives/attribute-directives'
125+
126+
# angular/directives/directive-example
127+
128+
- task: Npm@1
129+
displayName: 'angular/directives/directive-example: run unit tests'
130+
inputs:
131+
command: 'custom'
132+
customCommand: 'run test:ci'
133+
workingDir: './angular/directives/directive-example'
134+
135+
# angular/directives/structural-directives
136+
137+
- task: Npm@1
138+
displayName: 'angular/directives/structural-directives: run unit tests'
139+
inputs:
140+
command: 'custom'
141+
customCommand: 'run test:ci'
142+
workingDir: './angular/directives/structural-directives'
143+
144+
# angular/events
145+
146+
- task: Npm@1
147+
displayName: 'angular/events: run unit tests'
148+
inputs:
149+
command: 'custom'
150+
customCommand: 'run test:ci'
151+
workingDir: './angular/events'
152+
153+
# angular/ng-docker
154+
155+
- task: Npm@1
156+
displayName: 'angular/ng-docker: run unit tests'
157+
inputs:
158+
command: 'custom'
159+
customCommand: 'run test:ci'
160+
workingDir: './angular/ng-docker'
161+
162+
# angular/pipes/custom-pipes
163+
164+
- task: Npm@1
165+
displayName: 'angular/pipes/custom-pipes: run unit tests'
166+
inputs:
167+
command: 'custom'
168+
customCommand: 'run test:ci'
169+
workingDir: './angular/pipes/custom-pipes'
170+
171+
# angular/pipes/pure-impure
172+
173+
- task: Npm@1
174+
displayName: 'angular/pipes/pure-impure: run unit tests'
175+
inputs:
176+
command: 'custom'
177+
customCommand: 'run test:ci'
178+
workingDir: './angular/pipes/pure-impure'
179+
180+
# angular/pipes/standard-pipes
181+
182+
- task: Npm@1
183+
displayName: 'angular/pipes/standard-pipes: run unit tests'
184+
inputs:
185+
command: 'custom'
186+
customCommand: 'run test:ci'
187+
workingDir: './angular/pipes/standard-pipes'
188+
189+
# angular/plugins
190+
191+
- task: Npm@1
192+
displayName: 'angular/plugins: run unit tests'
193+
inputs:
194+
command: 'custom'
195+
customCommand: 'run test:ci'
196+
workingDir: './angular/plugins'

0 commit comments

Comments
 (0)