@xn-intenton-z2a/agentic-lib 7.2.1 → 7.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,12 +92,12 @@ jobs:
|
|
|
92
92
|
|
|
93
93
|
- name: Run behaviour tests
|
|
94
94
|
run: npm run test:behaviour
|
|
95
|
-
env:
|
|
96
|
-
|
|
95
|
+
#env:
|
|
96
|
+
# HOME: /root
|
|
97
97
|
|
|
98
98
|
- name: Upload screenshot
|
|
99
99
|
if: ${{ !cancelled() }}
|
|
100
|
-
uses: actions/upload-artifact@
|
|
100
|
+
uses: actions/upload-artifact@v7
|
|
101
101
|
with:
|
|
102
102
|
name: screenshot
|
|
103
103
|
path: SCREENSHOT_INDEX.png
|
|
@@ -192,16 +192,57 @@ jobs:
|
|
|
192
192
|
echo "type=behaviour" >> $GITHUB_OUTPUT
|
|
193
193
|
fi
|
|
194
194
|
|
|
195
|
-
- name:
|
|
196
|
-
id:
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
- name: Install dependencies (non-blocking)
|
|
196
|
+
id: install-deps
|
|
197
|
+
run: |
|
|
198
|
+
set +e
|
|
199
|
+
INSTALL_CMD="npm ci"
|
|
200
|
+
OUTPUT=$(eval "$INSTALL_CMD" 2>&1)
|
|
201
|
+
EXIT_CODE=$?
|
|
202
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
203
|
+
ERROR_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ error' | head -1 | grep -oP '\d+' || echo "0")
|
|
204
|
+
echo "error-count=$ERROR_COUNT" | tee -a $GITHUB_OUTPUT
|
|
205
|
+
echo "$OUTPUT" | tail -100 > /tmp/install-output.txt
|
|
206
|
+
echo "$OUTPUT"
|
|
207
|
+
exit 0
|
|
208
|
+
|
|
209
|
+
- name: Run unit tests (non-blocking)
|
|
210
|
+
id: unit-tests
|
|
199
211
|
run: |
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
212
|
+
set +e
|
|
213
|
+
TEST_CMD=""
|
|
214
|
+
if [ -f agentic-lib.toml ]; then
|
|
215
|
+
TEST_CMD=$(grep '^\s*test\s*=' agentic-lib.toml 2>/dev/null | head -1 | sed 's/.*=\s*"\([^"]*\)".*/\1/')
|
|
216
|
+
fi
|
|
217
|
+
TEST_CMD="${TEST_CMD:-npm test}"
|
|
218
|
+
OUTPUT=$(eval "$TEST_CMD" 2>&1)
|
|
219
|
+
EXIT_CODE=$?
|
|
220
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
221
|
+
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ pass' | head -1 | grep -oP '\d+' || echo "0")
|
|
222
|
+
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ fail' | head -1 | grep -oP '\d+' || echo "0")
|
|
223
|
+
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
224
|
+
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
225
|
+
echo "$OUTPUT" | tail -100 > /tmp/unit-test-output.txt
|
|
226
|
+
echo "$OUTPUT"
|
|
227
|
+
exit 0
|
|
228
|
+
|
|
229
|
+
- name: Run behaviour tests (non-blocking)
|
|
230
|
+
id: behaviour-tests
|
|
231
|
+
if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
|
|
232
|
+
run: |
|
|
233
|
+
set +e
|
|
234
|
+
npx playwright install --with-deps chromium 2>/dev/null || true
|
|
235
|
+
npm run build:web 2>/dev/null || true
|
|
236
|
+
OUTPUT=$(npm run --if-present test:behaviour 2>&1)
|
|
237
|
+
EXIT_CODE=$?
|
|
238
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
239
|
+
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
|
|
240
|
+
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
|
|
241
|
+
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
242
|
+
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
243
|
+
echo "$OUTPUT" | tail -50 > /tmp/behaviour-test-output.txt
|
|
244
|
+
echo "$OUTPUT"
|
|
245
|
+
exit 0
|
|
205
246
|
|
|
206
247
|
- name: Create or update instability issue
|
|
207
248
|
uses: actions/github-script@v8
|
|
@@ -211,8 +252,19 @@ jobs:
|
|
|
211
252
|
const failureType = '${{ steps.failure-type.outputs.type }}';
|
|
212
253
|
const runId = '${{ github.run_id }}';
|
|
213
254
|
const runUrl = `https://github.com/${{ github.repository }}/actions/runs/${runId}`;
|
|
214
|
-
|
|
215
|
-
|
|
255
|
+
|
|
256
|
+
// Live test results from earlier steps
|
|
257
|
+
const installOutput = fs.existsSync('/tmp/install-output.txt')
|
|
258
|
+
? fs.readFileSync('/tmp/install-output.txt', 'utf8').slice(0, 5000)
|
|
259
|
+
: '';
|
|
260
|
+
const unitOutput = fs.existsSync('/tmp/install-output.txt')
|
|
261
|
+
? fs.readFileSync('/tmp/install-output.txt', 'utf8').slice(0, 5000)
|
|
262
|
+
: '';
|
|
263
|
+
const behaviourOutput = fs.existsSync('/tmp/behaviour-test-output.txt')
|
|
264
|
+
? fs.readFileSync('/tmp/behaviour-test-output.txt', 'utf8').slice(0, 2500)
|
|
265
|
+
: '';
|
|
266
|
+
const logs = `=== Install Output ===\n${installOutput}\n\n=== Unit Test Output ===\n${unitOutput}\n\n=== Behaviour Test Output ===\n${behaviourOutput}`;
|
|
267
|
+
|
|
216
268
|
const title = `instability: ${failureType} test failure on main`;
|
|
217
269
|
const body = [
|
|
218
270
|
`## Test Failure Report`,
|
|
@@ -271,7 +271,17 @@ jobs:
|
|
|
271
271
|
|
|
272
272
|
- name: Install dependencies (non-blocking)
|
|
273
273
|
id: install-deps
|
|
274
|
-
run:
|
|
274
|
+
run: |
|
|
275
|
+
set +e
|
|
276
|
+
INSTALL_CMD="npm ci"
|
|
277
|
+
OUTPUT=$(eval "$INSTALL_CMD" 2>&1)
|
|
278
|
+
EXIT_CODE=$?
|
|
279
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
280
|
+
ERROR_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ error' | head -1 | grep -oP '\d+' || echo "0")
|
|
281
|
+
echo "error-count=$ERROR_COUNT" | tee -a $GITHUB_OUTPUT
|
|
282
|
+
echo "$OUTPUT" | tail -100 > /tmp/install-output.txt
|
|
283
|
+
echo "$OUTPUT"
|
|
284
|
+
exit 0
|
|
275
285
|
|
|
276
286
|
- name: Run unit tests (non-blocking)
|
|
277
287
|
id: unit-tests
|
|
@@ -284,12 +294,13 @@ jobs:
|
|
|
284
294
|
TEST_CMD="${TEST_CMD:-npm test}"
|
|
285
295
|
OUTPUT=$(eval "$TEST_CMD" 2>&1)
|
|
286
296
|
EXIT_CODE=$?
|
|
287
|
-
echo "exit-code=$EXIT_CODE"
|
|
297
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
288
298
|
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ pass' | head -1 | grep -oP '\d+' || echo "0")
|
|
289
299
|
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ fail' | head -1 | grep -oP '\d+' || echo "0")
|
|
290
|
-
echo "pass-count=$PASS_COUNT"
|
|
291
|
-
echo "fail-count=$FAIL_COUNT"
|
|
300
|
+
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
301
|
+
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
292
302
|
echo "$OUTPUT" | tail -100 > /tmp/unit-test-output.txt
|
|
303
|
+
echo "$OUTPUT"
|
|
293
304
|
exit 0
|
|
294
305
|
|
|
295
306
|
- name: Run behaviour tests (non-blocking)
|
|
@@ -301,12 +312,13 @@ jobs:
|
|
|
301
312
|
npm run build:web 2>/dev/null || true
|
|
302
313
|
OUTPUT=$(npm run --if-present test:behaviour 2>&1)
|
|
303
314
|
EXIT_CODE=$?
|
|
304
|
-
echo "exit-code=$EXIT_CODE"
|
|
315
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
305
316
|
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
|
|
306
317
|
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
|
|
307
|
-
echo "pass-count=$PASS_COUNT"
|
|
308
|
-
echo "fail-count=$FAIL_COUNT"
|
|
318
|
+
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
319
|
+
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
309
320
|
echo "$OUTPUT" | tail -50 > /tmp/behaviour-test-output.txt
|
|
321
|
+
echo "$OUTPUT"
|
|
310
322
|
exit 0
|
|
311
323
|
|
|
312
324
|
- name: Gather telemetry
|
|
@@ -429,8 +441,11 @@ jobs:
|
|
|
429
441
|
} catch (e) {}
|
|
430
442
|
|
|
431
443
|
// Live test results from earlier steps
|
|
432
|
-
const
|
|
433
|
-
? fs.readFileSync('/tmp/
|
|
444
|
+
const installOutput = fs.existsSync('/tmp/install-output.txt')
|
|
445
|
+
? fs.readFileSync('/tmp/install-output.txt', 'utf8').slice(0, 5000)
|
|
446
|
+
: '';
|
|
447
|
+
const unitOutput = fs.existsSync('/tmp/install-output.txt')
|
|
448
|
+
? fs.readFileSync('/tmp/install-output.txt', 'utf8').slice(0, 5000)
|
|
434
449
|
: '';
|
|
435
450
|
const behaviourOutput = fs.existsSync('/tmp/behaviour-test-output.txt')
|
|
436
451
|
? fs.readFileSync('/tmp/behaviour-test-output.txt', 'utf8').slice(0, 2500)
|
|
@@ -445,6 +460,11 @@ jobs:
|
|
|
445
460
|
featureFiles: features,
|
|
446
461
|
message: message || null,
|
|
447
462
|
liveTests: {
|
|
463
|
+
install: {
|
|
464
|
+
exitCode: parseInt('${{ steps.install-deps.outputs.exit-code }}' || '0'),
|
|
465
|
+
errorCount: parseInt('${{ steps.install-deps.outputs.error-count }}' || '0'),
|
|
466
|
+
output: installOutput,
|
|
467
|
+
},
|
|
448
468
|
unit: {
|
|
449
469
|
exitCode: parseInt('${{ steps.unit-tests.outputs.exit-code }}' || '0'),
|
|
450
470
|
passCount: parseInt('${{ steps.unit-tests.outputs.pass-count }}' || '0'),
|
|
@@ -480,6 +500,13 @@ jobs:
|
|
|
480
500
|
} catch (e) {}
|
|
481
501
|
const summary = JSON.stringify(telemetry);
|
|
482
502
|
core.setOutput('telemetry', summary.slice(0, maxTelemetryChars));
|
|
503
|
+
|
|
504
|
+
- name: Output telemetry
|
|
505
|
+
shell: bash
|
|
506
|
+
run: |
|
|
507
|
+
echo "Telemetry data:"
|
|
508
|
+
echo "${{ steps.gather.outputs.telemetry }}"
|
|
509
|
+
|
|
483
510
|
outputs:
|
|
484
511
|
telemetry: ${{ steps.gather.outputs.telemetry }}
|
|
485
512
|
|
package/package.json
CHANGED