-
Notifications
You must be signed in to change notification settings - Fork 144
Github Actions | Tests #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughA new reusable GitHub Action for running Python tests with coverage reporting was introduced. The build workflow was simplified to use a single Python version from a file, and a new test workflow was added to run tests across multiple Python versions using the new action. The development dependencies were updated to include Changes
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (3)
pyproject.toml (1)
25-27: Align version-pinning strategy across dev dependencies
pytest-covis introduced with a loose>=spec while several neighbouring dev deps (e.g.bandit,black) are pinned to an exact patch level. Mixing schemes weakens reproducibility. Either pin everything (==) or switch the whole group to compatible upper bounds (e.g.~=,<).- "pytest-cov>=6.2.1", + "pytest-cov==6.2.1",.github/actions/run-tests/action.yml (1)
17-27: Optional: include a coverage quality gateUploading the XML is great, but the job will still pass at 0 % coverage.
Consider enforcing a minimum with--cov-fail-under=<threshold>to guard against regressions..github/workflows/build.yml (1)
3-9: Add a concurrency group to avoid duplicate buildsWhen both
pushandpull_requesttriggers fire for the same branch, two identical “Build” jobs will run.
Add:concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: trueto save minutes and CI quota.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Lite
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
.github/actions/run-tests/action.yml(1 hunks).github/workflows/build.yml(2 hunks).github/workflows/test.yml(1 hunks)pyproject.toml(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/clean-code.mdc:0-0
Timestamp: 2025-07-01T11:52:43.736Z
Learning: Keep tests readable and maintainable
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
pyproject.toml (5)
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Separate dev dependencies
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Use proper package versions
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Pin dependency versions
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to {requirements.txt,pyproject.toml} : Store requirements in `requirements.txt` or `pyproject.toml`
.github/actions/run-tests/action.yml (3)
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/tech-stack.mdc:0-0
Timestamp: 2025-07-01T11:55:48.082Z
Learning: Applies to **/tests/**/*.py : Always add tests using pytest
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest for testing
Learnt from: CR
PR: qualifire-dev/qualifire#0
File: .cursor/rules/python.mdc:0-0
Timestamp: 2025-07-01T11:54:30.386Z
Learning: Applies to tests/**/*.py : Use pytest-cov for coverage
🔇 Additional comments (2)
.github/workflows/test.yml (2)
25-33: Slow matrix runs: cache the uv/venv layersEach job now reinstalls dependencies four times. Caching the uv cache directory (usually
~/.cache/uv) or the.venvpath can cut minutes off the matrix:- name: Cache uv uses: actions/cache@v4 with: path: ~/.cache/uv key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml') }}[ suggest_optional_refactor ]
33-37: Verify that the composite action actually receives dev packagesThis job relies on the fix proposed in
.github/actions/run-tests.
Please ensure the step is updated accordingly or the matrix will fail.
Summary by CodeRabbit
New Features
Chores
pytest-covas a development dependency for enhanced test coverage reporting.