Modifying pytest workflow to adapt it to other repositories#114
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Summary by CodeRabbit
WalkthroughReplaced Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
workflows_examples/pytests.yaml (1)
16-16: Use an immutable ref instead of@masterfor reusable workflows.Line 16 uses a moving branch ref, which risks unexpected breakage and inconsistent behavior. GitHub Actions best practices recommend pinning reusable workflows to commit SHAs (most secure), release tags, or major version tags for reproducibility and stability.
Suggested change
- uses: RedHatInsights/processing-tools/.github/workflows/pytests.yaml@master + uses: RedHatInsights/processing-tools/.github/workflows/pytests.yaml@<tag-or-commit-sha>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@workflows_examples/pytests.yaml` at line 16, Replace the moving branch ref in the reusable workflow invocation by pinning the uses reference to an immutable ref (commit SHA, release tag, or major-version tag) instead of `@master`; update the line that currently reads "uses: RedHatInsights/processing-tools/.github/workflows/pytests.yaml@master" to use a specific SHA or tag (e.g., `@v1` or @<commit-sha>) so the workflow invocation in workflows_examples/pytests.yaml is stable and reproducible.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@workflows_examples/pytests.yaml`:
- Line 16: Replace the moving branch ref in the reusable workflow invocation by
pinning the uses reference to an immutable ref (commit SHA, release tag, or
major-version tag) instead of `@master`; update the line that currently reads
"uses: RedHatInsights/processing-tools/.github/workflows/pytests.yaml@master" to
use a specific SHA or tag (e.g., `@v1` or @<commit-sha>) so the workflow
invocation in workflows_examples/pytests.yaml is stable and reproducible.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: ec162240-aa87-4e22-9d1d-80126d45436b
📒 Files selected for processing (2)
.github/workflows/pytests.yamlworkflows_examples/pytests.yaml
8c2dc9a to
e93e58d
Compare
Description
Refactoring of the reusable workflow in order to make it compatible with all Python repositories
Fixes #CCXDEV-15353
Type of change
Testing steps
Tested with
actand in a repository