File tree 3 files changed +23
-0
lines changed
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 50
50
$GIT_TAG = $($env:GITHUB_REF).replace("refs/tags/", "")
51
51
./loreline version --check-tag $GIT_TAG
52
52
53
+ - name : Run unit tests
54
+ working-directory : .
55
+ run : |
56
+ ./loreline test ./test
57
+
53
58
- name : Create zip archive
54
59
working-directory : .
55
60
run : |
@@ -129,6 +134,11 @@ jobs:
129
134
GIT_TAG=${GITHUB_REF/refs\/tags\//}
130
135
./loreline version --check-tag $GIT_TAG
131
136
137
+ - name : Run unit tests
138
+ working-directory : .
139
+ run : |
140
+ ./loreline test ./test
141
+
132
142
- name : Create zip archive
133
143
run : zip --symlinks -9 'loreline-mac.zip' loreline
134
144
@@ -209,6 +219,11 @@ jobs:
209
219
GIT_TAG=${GITHUB_REF/refs\/tags\//}
210
220
./loreline version --check-tag $GIT_TAG
211
221
222
+ - name : Run unit tests
223
+ working-directory : .
224
+ run : |
225
+ ./loreline test ./test
226
+
212
227
- name : Create zip archive
213
228
run : zip --symlinks -9 'loreline-linux-${{ matrix.arch }}.zip' loreline
214
229
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ class Cli {
56
56
57
57
var loadedSave : Bool = false ;
58
58
59
+ var hasFailedTest : Bool = false ;
60
+
59
61
function new () {
60
62
61
63
#if loreline_debug_interpreter
@@ -226,6 +228,10 @@ class Cli {
226
228
print (' ' );
227
229
}
228
230
231
+ if (hasFailedTest ) {
232
+ Sys .exit (1 );
233
+ }
234
+
229
235
}
230
236
231
237
function testFile (file : String , crlf : Bool ) {
@@ -264,6 +270,7 @@ class Cli {
264
270
print (' PASS' .green ().bold () + ' - ' + file .gray () + (testCase .choices != null && testCase .choices .length > 0 ? ' ~ ' .gray () + ' [ ${testCase .choices .join (' ,' )}]' .gray () : ' ' ));
265
271
}
266
272
else {
273
+ hasFailedTest = true ;
267
274
print (' FAIL' .red ().bold () + (result .error != null ? ' - ' + result .error : ' ' ) + ' - ' + file .gray () + (testCase .choices != null && testCase .choices .length > 0 ? ' ~ ' .gray () + ' [ ${testCase .choices .join (' ,' )}]' .gray () : ' ' ));
268
275
269
276
if (TestRunner .compareOutput (testCase .expectedOutput , result .actualOutput ) != - 1 ) {
@@ -318,6 +325,7 @@ class Cli {
318
325
});
319
326
}
320
327
catch (e : Any ) {
328
+ hasFailedTest = true ;
321
329
print (' FAIL' .red ().bold () + ' - $e - ' + file .gray ());
322
330
}
323
331
You can’t perform that action at this time.
0 commit comments