@xn-intenton-z2a/agentic-lib 7.2.19 → 7.2.20
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.
|
@@ -256,12 +256,53 @@ jobs:
|
|
|
256
256
|
merged-prs: ${{ steps.cleanup.outputs.merged-prs }}
|
|
257
257
|
closed-prs: ${{ steps.cleanup.outputs.closed-prs }}
|
|
258
258
|
|
|
259
|
-
# ─── Telemetry:
|
|
260
|
-
telemetry:
|
|
259
|
+
# ─── Behaviour Telemetry: run Playwright tests in container ────────
|
|
260
|
+
behaviour-telemetry:
|
|
261
261
|
needs: params
|
|
262
262
|
if: |
|
|
263
263
|
needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only' || needs.params.outputs.mode == 'review-only'
|
|
264
264
|
runs-on: ubuntu-latest
|
|
265
|
+
container: mcr.microsoft.com/playwright:v1.58.2-noble
|
|
266
|
+
steps:
|
|
267
|
+
- uses: actions/checkout@v6
|
|
268
|
+
|
|
269
|
+
- uses: actions/setup-node@v6
|
|
270
|
+
with:
|
|
271
|
+
node-version: 24
|
|
272
|
+
|
|
273
|
+
- name: Install dependencies (non-blocking)
|
|
274
|
+
run: npm ci 2>/dev/null || npm install 2>/dev/null || true
|
|
275
|
+
|
|
276
|
+
- name: Build web assets (non-blocking)
|
|
277
|
+
run: npm run build:web 2>/dev/null || true
|
|
278
|
+
|
|
279
|
+
- name: Run behaviour tests (non-blocking)
|
|
280
|
+
id: behaviour-tests
|
|
281
|
+
if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
|
|
282
|
+
run: |
|
|
283
|
+
set +e
|
|
284
|
+
OUTPUT=$(npm run --if-present test:behaviour 2>&1)
|
|
285
|
+
EXIT_CODE=$?
|
|
286
|
+
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
287
|
+
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
|
|
288
|
+
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
|
|
289
|
+
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
290
|
+
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
291
|
+
echo "$OUTPUT"
|
|
292
|
+
exit 0
|
|
293
|
+
|
|
294
|
+
outputs:
|
|
295
|
+
exit-code: ${{ steps.behaviour-tests.outputs.exit-code || '-1' }}
|
|
296
|
+
pass-count: ${{ steps.behaviour-tests.outputs.pass-count || '0' }}
|
|
297
|
+
fail-count: ${{ steps.behaviour-tests.outputs.fail-count || '0' }}
|
|
298
|
+
|
|
299
|
+
# ─── Telemetry: gather repo state for supervisor ───────────────────
|
|
300
|
+
telemetry:
|
|
301
|
+
needs: [params, behaviour-telemetry]
|
|
302
|
+
if: |
|
|
303
|
+
!cancelled() &&
|
|
304
|
+
(needs.params.outputs.mode == 'full' || needs.params.outputs.mode == 'dev-only' || needs.params.outputs.mode == 'review-only')
|
|
305
|
+
runs-on: ubuntu-latest
|
|
265
306
|
steps:
|
|
266
307
|
- uses: actions/checkout@v6
|
|
267
308
|
|
|
@@ -304,24 +345,6 @@ jobs:
|
|
|
304
345
|
echo "$OUTPUT"
|
|
305
346
|
exit 0
|
|
306
347
|
|
|
307
|
-
- name: Run behaviour tests (non-blocking)
|
|
308
|
-
id: behaviour-tests
|
|
309
|
-
if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
|
|
310
|
-
run: |
|
|
311
|
-
set +e
|
|
312
|
-
npx playwright install --with-deps chromium 2>/dev/null || true
|
|
313
|
-
npm run build:web 2>/dev/null || true
|
|
314
|
-
OUTPUT=$(npm run --if-present test:behaviour 2>&1)
|
|
315
|
-
EXIT_CODE=$?
|
|
316
|
-
echo "exit-code=$EXIT_CODE" | tee -a $GITHUB_OUTPUT
|
|
317
|
-
PASS_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ passed' | head -1 | grep -oP '\d+' || echo "0")
|
|
318
|
-
FAIL_COUNT=$(echo "$OUTPUT" | grep -oP '\d+ failed' | head -1 | grep -oP '\d+' || echo "0")
|
|
319
|
-
echo "pass-count=$PASS_COUNT" | tee -a $GITHUB_OUTPUT
|
|
320
|
-
echo "fail-count=$FAIL_COUNT" | tee -a $GITHUB_OUTPUT
|
|
321
|
-
echo "$OUTPUT" > /tmp/behaviour-test-output.txt
|
|
322
|
-
echo "$OUTPUT"
|
|
323
|
-
exit 0
|
|
324
|
-
|
|
325
348
|
- name: Gather telemetry
|
|
326
349
|
id: gather
|
|
327
350
|
uses: actions/github-script@v8
|
|
@@ -462,10 +485,6 @@ jobs:
|
|
|
462
485
|
const unitOutput = fs.existsSync('/tmp/unit-test-output.txt')
|
|
463
486
|
? fs.readFileSync('/tmp/unit-test-output.txt', 'utf8')
|
|
464
487
|
: '';
|
|
465
|
-
const behaviourOutput = fs.existsSync('/tmp/behaviour-test-output.txt')
|
|
466
|
-
? fs.readFileSync('/tmp/behaviour-test-output.txt', 'utf8')
|
|
467
|
-
: '';
|
|
468
|
-
|
|
469
488
|
const telemetry = {
|
|
470
489
|
issues: issuesSummary,
|
|
471
490
|
instabilityIssues: instabilityNumbers,
|
|
@@ -487,10 +506,9 @@ jobs:
|
|
|
487
506
|
output: unitOutput,
|
|
488
507
|
},
|
|
489
508
|
behaviour: {
|
|
490
|
-
exitCode: parseInt('${{
|
|
491
|
-
passCount: parseInt('${{
|
|
492
|
-
failCount: parseInt('${{
|
|
493
|
-
output: behaviourOutput,
|
|
509
|
+
exitCode: parseInt('${{ needs.behaviour-telemetry.outputs.exit-code }}' || '-1'),
|
|
510
|
+
passCount: parseInt('${{ needs.behaviour-telemetry.outputs.pass-count }}' || '0'),
|
|
511
|
+
failCount: parseInt('${{ needs.behaviour-telemetry.outputs.fail-count }}' || '0'),
|
|
494
512
|
},
|
|
495
513
|
},
|
|
496
514
|
externalTestResults,
|
|
@@ -767,13 +785,13 @@ jobs:
|
|
|
767
785
|
- name: Install project dependencies
|
|
768
786
|
run: npm ci
|
|
769
787
|
|
|
770
|
-
- name: Install Playwright (for behaviour tests)
|
|
771
|
-
if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
|
|
772
|
-
run: npx playwright install --with-deps chromium
|
|
773
|
-
|
|
774
|
-
- name: Self-init (agentic-lib dev only)
|
|
775
|
-
if: hashFiles('scripts/self-init.sh') != '' && hashFiles('.github/agentic-lib/actions/agentic-step/package.json') == ''
|
|
776
|
-
run: bash scripts/self-init.sh
|
|
788
|
+
# - name: Install Playwright (for behaviour tests)
|
|
789
|
+
# if: hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != ''
|
|
790
|
+
# run: npx playwright install --with-deps chromium
|
|
791
|
+
#
|
|
792
|
+
# - name: Self-init (agentic-lib dev only)
|
|
793
|
+
# if: hashFiles('scripts/self-init.sh') != '' && hashFiles('.github/agentic-lib/actions/agentic-step/package.json') == ''
|
|
794
|
+
# run: bash scripts/self-init.sh
|
|
777
795
|
|
|
778
796
|
- name: Install agentic-step dependencies
|
|
779
797
|
working-directory: .github/agentic-lib/actions/agentic-step
|
|
@@ -1262,29 +1280,29 @@ jobs:
|
|
|
1262
1280
|
echo "tests-passed=true" >> $GITHUB_OUTPUT
|
|
1263
1281
|
echo "All tests passed"
|
|
1264
1282
|
|
|
1265
|
-
- name: Run behaviour tests before committing
|
|
1266
|
-
id: pre-commit-behaviour-test
|
|
1267
|
-
if: steps.issue.outputs.issue-number != '' && steps.pre-commit-test.outputs.tests-passed == 'true' && (hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != '')
|
|
1268
|
-
run: |
|
|
1269
|
-
npx playwright install --with-deps chromium 2>/dev/null || true
|
|
1270
|
-
npm run build:web 2>/dev/null || true
|
|
1271
|
-
set +e
|
|
1272
|
-
npm run --if-present test:behaviour 2>&1 | tail -30
|
|
1273
|
-
EXIT_CODE=$?
|
|
1274
|
-
if [ $EXIT_CODE -ne 0 ]; then
|
|
1275
|
-
echo "::warning::Behaviour test attempt 1 failed — retrying"
|
|
1276
|
-
sleep 2
|
|
1277
|
-
npm run --if-present test:behaviour 2>&1 | tail -30
|
|
1278
|
-
EXIT_CODE=$?
|
|
1279
|
-
fi
|
|
1280
|
-
set -e
|
|
1281
|
-
if [ $EXIT_CODE -ne 0 ]; then
|
|
1282
|
-
echo "tests-passed=false" >> $GITHUB_OUTPUT
|
|
1283
|
-
echo "WARNING: Behaviour tests failed (exit $EXIT_CODE) — skipping commit and PR"
|
|
1284
|
-
exit 0
|
|
1285
|
-
fi
|
|
1286
|
-
echo "tests-passed=true" >> $GITHUB_OUTPUT
|
|
1287
|
-
echo "Behaviour tests passed"
|
|
1283
|
+
# - name: Run behaviour tests before committing
|
|
1284
|
+
# id: pre-commit-behaviour-test
|
|
1285
|
+
# if: steps.issue.outputs.issue-number != '' && steps.pre-commit-test.outputs.tests-passed == 'true' && (hashFiles('playwright.config.js') != '' || hashFiles('playwright.config.ts') != '')
|
|
1286
|
+
# run: |
|
|
1287
|
+
# npx playwright install --with-deps chromium 2>/dev/null || true
|
|
1288
|
+
# npm run build:web 2>/dev/null || true
|
|
1289
|
+
# set +e
|
|
1290
|
+
# npm run --if-present test:behaviour 2>&1 | tail -30
|
|
1291
|
+
# EXIT_CODE=$?
|
|
1292
|
+
# if [ $EXIT_CODE -ne 0 ]; then
|
|
1293
|
+
# echo "::warning::Behaviour test attempt 1 failed — retrying"
|
|
1294
|
+
# sleep 2
|
|
1295
|
+
# npm run --if-present test:behaviour 2>&1 | tail -30
|
|
1296
|
+
# EXIT_CODE=$?
|
|
1297
|
+
# fi
|
|
1298
|
+
# set -e
|
|
1299
|
+
# if [ $EXIT_CODE -ne 0 ]; then
|
|
1300
|
+
# echo "tests-passed=false" >> $GITHUB_OUTPUT
|
|
1301
|
+
# echo "WARNING: Behaviour tests failed (exit $EXIT_CODE) — skipping commit and PR"
|
|
1302
|
+
# exit 0
|
|
1303
|
+
# fi
|
|
1304
|
+
# echo "tests-passed=true" >> $GITHUB_OUTPUT
|
|
1305
|
+
# echo "Behaviour tests passed"
|
|
1288
1306
|
|
|
1289
1307
|
- name: Commit and push
|
|
1290
1308
|
if: github.repository != 'xn-intenton-z2a/agentic-lib' && steps.issue.outputs.issue-number != '' && needs.params.outputs.dry-run != 'true' && steps.pre-commit-test.outputs.tests-passed == 'true' && steps.pre-commit-behaviour-test.outputs.tests-passed != 'false'
|
package/package.json
CHANGED