Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 18 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,29 +288,21 @@ jobs:
message-id: e2e-test-results

- name: Check test results
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');

let totalFailed = 0;

try {
const resultsDir = 'all-test-results';
const shards = fs.readdirSync(resultsDir);

for (const shard of shards) {
const resultsPath = path.join(resultsDir, shard, 'results.json');
if (fs.existsSync(resultsPath)) {
const results = JSON.parse(fs.readFileSync(resultsPath, 'utf8'));
totalFailed += results.stats.unexpected || 0;
}
}

if (totalFailed > 0) {
core.setFailed(`${totalFailed} test(s) failed`);
}
} catch (error) {
core.setFailed(`Failed to read test results: ${error.message}`);
}
id: check-results
run: |
total_failed=0
for dir in all-test-results/*/; do
if [ -f "${dir}results.json" ]; then
unexpected=$(jq -r '.stats.unexpected // 0' "${dir}results.json")
total_failed=$((total_failed + unexpected))
fi
done
if [ "$total_failed" -gt 0 ]; then
echo "::error::$total_failed E2E test(s) failed"
exit 1
fi
# Fail when any shard failed even if we couldn't read failure count from artifacts
if [ "${{ needs.e2e-tests.result }}" = "failure" ]; then
echo "::error::One or more E2E test shards failed"
exit 1
fi
Loading