Skip to content

fix: checkout repo in Test Report so test-reporter can list tracked files#346

Merged
Arthurvdv merged 1 commit into
mainfrom
fix/test-report-missing-checkout
Jun 17, 2026
Merged

fix: checkout repo in Test Report so test-reporter can list tracked files#346
Arthurvdv merged 1 commit into
mainfrom
fix/test-report-missing-checkout

Conversation

@Arthurvdv

Copy link
Copy Markdown
Member

Problem

The Test Report workflow (test-report.yml, introduced in #345 / commit 6e14a0d) runs via workflow_run without checking out the repository. It downloads the per-version test-results-* artifacts with a manual download-artifact step (merge-multiple: true) to build a single unified report, then passes only path: to dorny/test-reporter.

dorny/test-reporter only uses the GitHub REST API to list tracked files (for resolving source paths in failure annotations) when it downloads the artifact via the artifact: input. With the manual-download + path: setup it falls back to git ls-files, which fails:

Listing all files tracked by git
  /usr/bin/git ls-files -z
  fatal: not a git repository (or any of the parent directories): .git
Error: The process '/usr/bin/git' failed with exit code 128

Because test-report.yml runs from main, this currently fails for every PR.

Fix

Add an actions/checkout@v6 step before the artifact download, pinned to workflow_run.head_sha, so:

  • git ls-files finds a repository, and
  • annotations resolve against the exact tested commit (including new files in fork PRs).

The single unified report behavior is preserved (no switch to the per-artifact artifact: input).

Notes

  • Checkout runs before download-artifact so its default cleaning does not remove the downloaded TestResults.
  • Only contents: read is needed, which the job already grants.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…iles

The Test Report workflow runs via workflow_run with no checkout. With a
manual download-artifact step (used to merge per-version test-results-*
artifacts into one unified report), dorny/test-reporter falls back to
'git ls-files' to resolve source paths for annotations and fails with
'fatal: not a git repository'. It only uses the GitHub REST API for file
listing when it downloads the artifact itself via the 'artifact:' input.

Add an actions/checkout step (pinned to workflow_run.head_sha) before the
download so git ls-files succeeds and annotations map to the tested commit,
while preserving the single unified report.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Arthurvdv Arthurvdv merged commit 3fada81 into main Jun 17, 2026
46 checks passed
@Arthurvdv Arthurvdv deleted the fix/test-report-missing-checkout branch June 17, 2026 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant