Skip to content

junit-upload fails on <testsuites> without attributes #59

junit-upload fails on <testsuites> without attributes

junit-upload fails on <testsuites> without attributes #59

Workflow file for this run

name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude') &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.review.author_association)) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')) &&
contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.issue.author_association))
)
runs-on: ubuntu-latest
concurrency:
group: claude-${{ github.event.issue.number || github.event.pull_request.number }}
cancel-in-progress: true
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
# Enable progress tracking for visual feedback
track_progress: true
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Allowed tools organized by category:
# 1. Core: Task, Read, Edit, Write, Glob, Grep, WebFetch
# 2. Bash build: npm, npx, node, git, ls
# 3. Bash gh: gh pr view/diff, gh issue view, gh api
# 4. File ops: commit_files, update_claude_comment
# 5. Issues: read, write, comment, list, search
# 6. PRs: read, create, update, branch sync, list, search
# 7. Reviews: pending create/add/submit, reply
# NOTE: create_inline_comment and pull_request_review_write are intentionally
# excluded — they create a separate review per comment. Use the pending review
# flow (create → add comments → submit) to batch all comments into one review.
# 8. Repo: file contents, tree, commits, code search, branches
# 9. CI/CD: actions get/list, job logs
# 10. Security: code scanning, secret scanning, dependabot
claude_args: |
--model claude-opus-4-6
--max-turns 50
--append-system-prompt "IMPORTANT: You MUST read and follow the CLAUDE.md file at the root of the repository before starting any work. It contains critical project conventions, commands, and patterns you must adhere to. After making ANY code changes and BEFORE committing, you MUST run formatting, linting, and tests. Follow these steps: 1. Run npm run fmt to format all changed code. 2. Run npm run lint to check for linting issues. 3. Run npm run typecheck to verify types. 4. Run npm test to run all tests. If formatting or linting produces errors, fix them and re-run until clean. If tests fail, investigate and fix the root cause. Do NOT commit code that has lint errors or test failures."
--allowedTools "Task,Read,Edit,Write,Glob,Grep,WebFetch,Bash(npm *),Bash(npx *),Bash(node *),Bash(git *),Bash(ls *),Bash(gh pr view:*),Bash(gh pr diff:*),Bash(gh issue view:*),Bash(gh api:*),mcp__github_file_ops__commit_files,mcp__github_file_ops__update_claude_comment,mcp__github__issue_read,mcp__github__issue_write,mcp__github__add_issue_comment,mcp__github__list_issues,mcp__github__search_issues,mcp__github__pull_request_read,mcp__github__create_pull_request,mcp__github__update_pull_request,mcp__github__update_pull_request_branch,mcp__github__list_pull_requests,mcp__github__search_pull_requests,mcp__github__create_pending_pull_request_review,mcp__github__add_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__add_reply_to_pull_request_comment,mcp__github__get_file_contents,mcp__github__get_repository_tree,mcp__github__list_commits,mcp__github__get_commit,mcp__github__search_code,mcp__github__create_branch,mcp__github__list_branches,mcp__github__actions_get,mcp__github__actions_list,mcp__github__get_job_logs,mcp__github__list_code_scanning_alerts,mcp__github__get_code_scanning_alert,mcp__github__list_secret_scanning_alerts,mcp__github__get_secret_scanning_alert,mcp__github__list_dependabot_alerts,mcp__github__get_dependabot_alert"
env:
MAX_MCP_OUTPUT_TOKENS: '50000'