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
12 changes: 12 additions & 0 deletions .github/workflows/e2e-generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,21 +220,33 @@ jobs:
git status --porcelain=v1 --untracked-files=all | cut -c4- > "$RUNNER_TEMP/baseline.txt"
source "$RUNNER_TEMP/claude-args.sh"
mkdir -p "$RUNNER_TEMP/claude"
failed=0
while read -r PR; do
echo "::group::PR #$PR"
prompt=$(sed "s/{PR}/$PR/" "$RUNNER_TEMP/prompt.txt")
status=0
(cd frontend && timeout 40m claude -p "$prompt" "${claude_args[@]}" \
< /dev/null > "$RUNNER_TEMP/claude/pr-$PR.jsonl") || status=$?
jq -r 'select(.type == "result") | .result // .subtype' "$RUNNER_TEMP/claude/pr-$PR.jsonl" || true
# claude exits 0 on API errors such as a rejected token; only the result line says so.
error=$(jq -r 'select(.type == "result" and .is_error) | .result' "$RUNNER_TEMP/claude/pr-$PR.jsonl" || true)
if [ "$status" = "124" ]; then
echo "- PR #$PR: claude timed out after 40 min" >> "$REPORT"
failed=$((failed + 1))
elif [ "$status" != "0" ]; then
echo "- PR #$PR: claude exited with $status" >> "$REPORT"
failed=$((failed + 1))
elif [ -n "$error" ]; then
echo "- PR #$PR: claude failed: $error" >> "$REPORT"
failed=$((failed + 1))
fi
"$RUNNER_TEMP/guard.sh" "$RUNNER_TEMP/baseline.txt" "PR #$PR"
echo "::endgroup::"
done < "$RUNNER_TEMP/prs.txt"
if [ "$failed" = "$(wc -l < "$RUNNER_TEMP/prs.txt" | tr -d ' ')" ]; then
echo "::error::claude failed on every PR; check CLAUDE_CODE_OAUTH_TOKEN and the report."
exit 1
fi

- name: Run the new tests once
id: result
Expand Down
Loading