Skip to content

fix(ci): clean target test scratch dirs before cache save#319

Merged
EffortlessSteven merged 1 commit into
mainfrom
fix/ci-target-tests-cleanup
Mar 28, 2026
Merged

fix(ci): clean target test scratch dirs before cache save#319
EffortlessSteven merged 1 commit into
mainfrom
fix/ci-target-tests-cleanup

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

  • remove arget/tests after cargo xtask ci in the main CI job
  • prevent the rust-cache post-step from walking stale cargo-mutants/trybuild scratch paths
  • keep the fix limited to workflow cleanup with no library changes

Why

The rerun for 58d1427 surfaced GitHub Actions annotations against /home/runner/work/uselesskey/uselesskey/target/tests/target during post-job processing. Cleaning the scratch tree before artifact/cache post-steps avoids that runner-side ENOENT failure.

@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 67344174-4735-470e-8d7e-36f2a4a39855

📥 Commits

Reviewing files that changed from the base of the PR and between 58d1427 and 12ad851.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Summary by CodeRabbit

  • Chores
    • Improved CI/CD pipeline efficiency by optimizing artifact cleanup during builds.

Walkthrough

A new CI cleanup step is added to the main job that removes the target/tests directory after cargo xtask ci completes, using if: always() to ensure cleanup runs before artifact uploads.

Changes

Cohort / File(s) Summary
CI Workflow Cleanup
.github/workflows/ci.yml
Added step to remove target/tests directory post-build with if: always() condition to ensure cleanup before artifact upload.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hop, hop, the tests do skip,
Artifacts ready for their upload trip,
target/tests swept away so clean,
The tidiest CI pipeline I've seen!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix(ci): clean target test scratch dirs before cache save' directly describes the main change—adding a step to remove target/tests directories in CI before cache operations.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the addition of target/tests cleanup in CI, the motivation (preventing ENOENT failures), and scope (workflow-only changes).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-target-tests-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@EffortlessSteven EffortlessSteven merged commit 449adfa into main Mar 28, 2026
4 checks passed
@EffortlessSteven EffortlessSteven deleted the fix/ci-target-tests-cleanup branch March 28, 2026 07:44
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