Skip to content

Add packages input for selective package testing#9

Merged
Sewer56 merged 1 commit intov1-masterfrom
feature/add-packages-input
Feb 14, 2026
Merged

Add packages input for selective package testing#9
Sewer56 merged 1 commit intov1-masterfrom
feature/add-packages-input

Conversation

@Sewer56
Copy link
Member

@Sewer56 Sewer56 commented Feb 14, 2026

Summary

Adds a packages input to allow testing specific packages instead of the entire workspace.

Problem

When using --exclude with cargo tarpaulin/workspace commands, excluded packages are still compiled as dependencies of included packages. This causes issues when packages have mutually exclusive features (e.g., async vs blocking).

Solution

New packages input accepts a multi-line list of package names:

- uses: Reloaded-Project/devops-rust-test-and-coverage@v1
  with:
    packages: |
      package-a
      package-b

When provided, the action uses -p <pkg> flags instead of --all.

Testing

  • Added .github/workflows/test-packages-input.yml with a fixture workspace under tests/fixtures/packages-input-workspace
  • Tests empty packages (backward compatible), single package, and multiple packages
  • Exercises both cargo and cross code paths (and tarpaulin)

Backward Compatibility

When packages is empty (default), behavior is unchanged (uses --all).

@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

Warning

Rate limit exceeded

@Sewer56 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 13 minutes and 43 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Adds a new packages input to the action and wires it through action.yml as a sanitized SAFE_PACKAGES environment variable. PACKAGES_ARG is constructed from SAFE_PACKAGES and applied to cargo, cross, and tarpaulin test invocations; cache-key composition was extended to include SAFE_PACKAGES. Adds a test fixture workspace with package-a, package-b, package-c and tests that assert package-specific marker files. Adds a GitHub Actions workflow (tests/.github/workflows/test-packages-input.yml) and documents the packages input in README.md.

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add packages input for selective package testing' accurately summarizes the main change: adding a new packages input feature to the action for targeted package testing.
Description check ✅ Passed The description is well-related to the changeset, explaining the problem (--exclude compilation issues), the solution (new packages input), testing approach, and backward compatibility.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into v1-master

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/add-packages-input

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.

@Sewer56 Sewer56 force-pushed the feature/add-packages-input branch 5 times, most recently from 4284776 to c3aed58 Compare February 14, 2026 14:09
Add a new `packages` input that accepts a multi-line list of package
names to test. When provided, uses `-p <pkg>` flags instead of `--all`,
allowing selective testing of specific packages.

This solves the issue where --exclude doesn't prevent compilation of
excluded packages as dependencies, which is problematic when packages
have mutually exclusive features.

Changes:
- Add `packages` input parameter
- Update tarpaulin, cargo test, and cross test commands
- Add test workflow with fixture workspace
@Sewer56 Sewer56 force-pushed the feature/add-packages-input branch from c3aed58 to f816ecd Compare February 14, 2026 14:09
@Sewer56 Sewer56 merged commit f93656c into v1-master Feb 14, 2026
22 checks passed
@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (f7d1d74) to head (f816ecd).
⚠️ Report is 2 commits behind head on v1-master.

Additional details and impacted files
@@      Coverage Diff       @@
##   v1-master   #9   +/-   ##
==============================
==============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Sewer56 Sewer56 deleted the feature/add-packages-input branch February 14, 2026 14:13
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