fix(python-ci): include hidden files in coverage-artifact upload#181
Conversation
`actions/upload-artifact@v7` uses `@actions/glob` internally, which defaults to `excludeHiddenFiles: true`. When a caller repo's name starts with a dot (e.g. `.claude`), the runner workspace lives at `/home/runner/work/.<name>/.<name>` and `basename()` of the search root matches `/^\./`. The globber then skips the entire workspace before examining any file, the upload step logs `No files were found with the provided path`, and exits success with zero artifacts created. Result: `ByronWilliamsCPA/.claude`'s downstream `Coverage (Qlty)` workflow has been failing every run because `coverage-reports` never exists. The diagnostic chain ended with confirming `gh api repos/ByronWilliamsCPA/.claude/actions/runs/.../artifacts` returns `total_count: 0` despite the upload step concluding success. Setting `include-hidden-files: true` flips `excludeHiddenFiles -> false`, so the globber walks into the dot-prefix workspace path and finds `coverage.xml`, `htmlcov/`, etc. The flag is a no-op for all non-dot-prefix caller repos (current fleet: 13 of 14 callers), so blast radius is bounded to fixing `.claude` without changing behavior anywhere else. Refs: - actions/upload-artifact@v7.0.1 `src/shared/search.ts:25` - actions/toolkit `@actions/glob` internal-globber (excludeHiddenFiles + basename match on `/^\\./`)
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughGitHub Actions workflow updated to include hidden files in coverage artifact uploads by adding ChangesCoverage Artifact Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the reusable Python CI workflow to ensure coverage artifacts are uploaded even when the caller repository name starts with a dot, which makes the runner workspace path “hidden” to the globber by default.
Changes:
- Adds
include-hidden-files: trueto theactions/upload-artifactstep that uploadscoverage-reports.
|



Summary
include-hidden-files: trueto thecoverage-reportsupload step inpython-ci.yml.ByronWilliamsCPA/.claude, the sole dot-prefix repo in the fleet that calls this template).Root cause
actions/upload-artifact@v7uses@actions/globinternally, whose defaultexcludeHiddenFiles: truecauses the traversal to skip any directory whose basename matches^\.. For a caller named.claude, the runner workspace lives at/home/runner/work/.claude/.claude— the search root itself matches the hidden-file pattern, so the entire workspace is skipped before any file is examined.The upload step then logs:
…and exits
success.gh api repos/ByronWilliamsCPA/.claude/actions/runs/<id>/artifactsconfirmedtotal_count: 0— the artifact has never been successfully uploaded since this repo was created. The downstreamCoverage (Qlty)workflow has been failing every run as a consequence.Note: this is not a v7 regression.
actions/upload-artifact@v4has the sameexcludeHiddenFilesdefault; downgrading would not fix the bug.Fix
- name: Upload coverage artifacts if: steps.detect.outputs.state == 'uv-locked' || steps.detect.outputs.state == 'uv-no-lock' uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: coverage-reports + include-hidden-files: true path: | coverage.xml coverage-*.xml junit-*.xml htmlcov/ retention-days: 7Setting
include-hidden-files: trueflipsexcludeHiddenFilestofalse, so the globber traverses into the dot-prefix workspace and finds the coverage outputs as expected.Blast radius
.claude): fixes the silent upload failure.^\., so the flag is inert..coverage) are included, not whether secrets/credentials are uploaded. Thepath:list already restricts what gets uploaded to coverage outputs only.Test plan
ByronWilliamsCPA/.claudemain (any push or workflow_dispatch).gh api repos/ByronWilliamsCPA/.claude/actions/runs/<id>/artifacts --jq '.artifacts[].name'listscoverage-reports.Coverage (Qlty)workflow run for that SHA concludessuccess.References
actions/upload-artifact@v7.0.1source:src/shared/search.ts:25(excludeHiddenFiles: !includeHiddenFiles).actions/toolkit@actions/globinternal-globber.tsfilter:if (options.excludeHiddenFiles && path.basename(item.path).match(/^\\./)) { continue }.Generated with Claude Code
Summary by CodeRabbit