59
59
60
60
61
61
62
- # Report specific error message if mocha for integration tests fails
62
+ # Report specific error message if jest for basic tests fails
63
63
- filters :
64
64
ensure :
65
65
value : " {{report_ci}}"
@@ -71,40 +71,64 @@ rules:
71
71
state : " failed"
72
72
allow_failure : false
73
73
config :
74
- env : JOB_PART=integration
74
+ env : JOB_PART=basic
75
75
fetch : travis_job.log
76
76
string_cleanup :
77
77
id : logResult
78
78
value : " {{{fetch}}}"
79
79
remove :
80
- - " ^[\\ s\\ S]+?\\ d+\\ s+pending\n +"
81
- - " npm ERR!.*\n "
82
- - " \n *=============================================================================\n [\\ s\\ S]*"
80
+ - " ^[\\ s\\ S]+?\\ $ yarn travis:\\ $JOB_PART.*\n "
81
+ - " \\ $ node --max-old-space-size=4096.*\n "
82
+ - " ^yarn run.+\n "
83
+ - " \\ (node:\\ d+\\ ) \\ [DEP0005\\ ].+\n "
84
+ - " \\ $ yarn (cover|test):.+\n "
85
+ - " Ran all test suites.\n [\\ s\\ S]*"
86
+ - " PASS test/.*\n "
83
87
string_cleanup_1 :
84
88
id : firstError
85
89
value : " {{{logResult}}}"
86
90
remove :
87
- - " \\ s2\\ )\\ s[\\ s\\ S]*"
91
+ - " \n\n ●[\\ s\\ S]*"
92
+ - " Test Suites:[\\ s\\ S]*"
93
+ - " \\ s+$"
88
94
string_cleanup_2 :
89
95
id : remainingErrors
90
96
value : " {{{logResult}}}"
91
97
remove :
92
- - " ^[\\ s\\ S]+?(?=\\ s2\\ )\\ s)"
98
+ - " ^[\\ s\\ S]+?(?=\n\n ●|$)"
99
+ - " ^\n +"
100
+ - " Test Suites:[\\ s\\ S]*"
101
+ - " \\ s+$"
102
+ string_cleanup_3 :
103
+ id : summary
104
+ value : " {{{logResult}}}"
105
+ remove :
106
+ - " ^[\\ s\\ S]+?(?=Test Suites:)"
107
+ - " \\ s+$"
93
108
actions :
94
109
comment :
95
110
identifier : " ci-result"
96
111
message : |-
112
+ The basic integration tests failed.
113
+
97
114
@{{commit.author.login}} Please review the following output log for errors:
115
+
98
116
```text
99
117
{{{firstError}}}
100
118
```
119
+ {{#if remainingErrors}}
101
120
<details>
102
121
<summary>Show remaining errors</summary>
103
122
104
123
```text
105
124
{{{remainingErrors}}}
106
125
```
107
126
</details>
127
+ {{/if}}
128
+
129
+ ```text
130
+ {{{summary}}}
131
+ ```
108
132
109
133
See [complete report here]({{status.target_url}}).
110
134
set :
@@ -113,7 +137,7 @@ rules:
113
137
114
138
115
139
116
- # Report specific error message if mocha for unit tests fails
140
+ # Report specific error message if jest for integration tests fails
117
141
- filters :
118
142
ensure :
119
143
value : " {{report_ci}}"
@@ -125,26 +149,64 @@ rules:
125
149
state : " failed"
126
150
allow_failure : false
127
151
config :
128
- env : JOB_PART=unit
152
+ env : JOB_PART=integration
129
153
fetch : travis_job.log
130
154
string_cleanup :
131
155
id : logResult
132
156
value : " {{{fetch}}}"
133
157
remove :
134
- - " ^[\\ s\\ S]+?\\ d+\\ s+pending\n +"
135
- - " npm ERR!.*\n "
136
- - " \n *=============================================================================\n [\\ s\\ S]*"
158
+ - " ^[\\ s\\ S]+?\\ $ yarn travis:\\ $JOB_PART.*\n "
159
+ - " \\ $ node --max-old-space-size=4096.*\n "
160
+ - " ^yarn run.+\n "
161
+ - " \\ (node:\\ d+\\ ) \\ [DEP0005\\ ].+\n "
162
+ - " \\ $ yarn (cover|test):.+\n "
163
+ - " The command \" yarn travis:\\ $JOB_PART\" exited[\\ s\\ S]*"
164
+ - " PASS test/.*\n "
165
+ string_cleanup_1 :
166
+ id : firstError
167
+ value : " {{{logResult}}}"
168
+ remove :
169
+ - " \n\n ●[\\ s\\ S]*"
170
+ - " Test Suites:[\\ s\\ S]*"
171
+ - " \\ s+$"
172
+ string_cleanup_2 :
173
+ id : remainingErrors
174
+ value : " {{{logResult}}}"
175
+ remove :
176
+ - " ^[\\ s\\ S]+?(?=\n\n ●|$)"
177
+ - " ^\n +"
178
+ - " Test Suites:[\\ s\\ S]*"
179
+ - " \\ s+$"
180
+ string_cleanup_3 :
181
+ id : summary
182
+ value : " {{{logResult}}}"
183
+ remove :
184
+ - " ^[\\ s\\ S]+?(?=Test Suites:)"
185
+ - " \\ s+$"
137
186
actions :
138
187
comment :
139
188
identifier : " ci-result"
140
189
message : |-
190
+ The basic integration tests succeeded, but the full suite failed.
191
+
141
192
@{{commit.author.login}} Please review the following output log for errors:
142
193
143
- ``` text
144
- {{{logResult }}}
194
+ ```text
195
+ {{{firstError }}}
145
196
```
197
+ {{#if remainingErrors}}
198
+ <details>
199
+ <summary>Show remaining errors</summary>
146
200
147
- Instead of updating these (outdated?) unit tests, you can choose to delete them and add integration tests instead. That would be great.
201
+ ```text
202
+ {{{remainingErrors}}}
203
+ ```
204
+ </details>
205
+ {{/if}}
206
+
207
+ ```text
208
+ {{{summary}}}
209
+ ```
148
210
149
211
See [complete report here]({{status.target_url}}).
150
212
set :
@@ -153,7 +215,7 @@ rules:
153
215
154
216
155
217
156
- # Report specific error message if linting fails
218
+ # Report specific error message if jest for unit tests or liniting fails
157
219
- filters :
158
220
ensure :
159
221
value : " {{report_ci}}"
@@ -163,26 +225,35 @@ rules:
163
225
context : " continuous-integration/travis-ci/pr"
164
226
travis_job :
165
227
state : " failed"
228
+ allow_failure : false
166
229
config :
167
- env : JOB_PART=lint
230
+ env : JOB_PART=lint-unit
168
231
fetch : travis_job.log
169
232
string_cleanup :
170
233
id : logResult
171
234
value : " {{{fetch}}}"
172
235
remove :
173
- - " ^[\\ s\\ S]+?npm run travis:\\ $JOB_PART\n *"
174
- - " npm ERR!.*\n "
175
- - " \n *The command \" npm run travis:\\ $JOB_PART\" exited [\\ s\\ S]*"
236
+ - " ^[\\ s\\ S]+?\\ $ yarn travis:\\ $JOB_PART.*\n "
237
+ - " \\ $ node --max-old-space-size=4096.*\n "
238
+ - " ^yarn run.+\n "
239
+ - " \\ (node:\\ d+\\ ) \\ [DEP0005\\ ].+\n "
240
+ - " \\ $ yarn (unit|lint).+\n "
241
+ - " The command \" yarn travis:\\ $JOB_PART\" exited[\\ s\\ S]*"
242
+ - " PASS test/.*\n "
176
243
actions :
177
244
comment :
178
245
identifier : " ci-result"
179
246
message : |-
180
- @{{commit.author.login}} The tests look fine, but there are code style issue in your Pull Request. Please review the following:
247
+ The integration tests look fine, but there are code style issues or unit test failures in the Pull Request.
248
+
249
+ @{{commit.author.login}} Please review the following output log for errors:
181
250
182
251
``` text
183
252
{{{logResult}}}
184
253
```
185
254
255
+ If the unit tests are outdated, you can choose to delete them and add integration tests instead. That would be great.
256
+
186
257
See [complete report here]({{status.target_url}}).
187
258
set :
188
259
id : report_ci
@@ -397,18 +468,6 @@ rules:
397
468
398
469
399
470
400
- # add small label to small pull requests
401
- - filters :
402
- open : true
403
- pull_request :
404
- additions : " <= 10"
405
- deletions : " <= 10"
406
- changed_files : " <= 2"
407
- actions :
408
- label : " PR: small"
409
-
410
-
411
-
412
471
# add non-master label to pull request to other branch
413
472
- filters :
414
473
open : true
@@ -567,7 +626,7 @@ rules:
567
626
568
627
569
628
570
- # Check issues every week
629
+ # Check open issues and pull requests every day
571
630
- filters :
572
631
open : true
573
632
actions :
0 commit comments