Repository navigation
Upgrade CI/CD workflow to use latest actions - #83
jeniferalaquoke wants to merge 1 commit into
Conversation
**CI/CD Pipeline – Automated Testing and Code Quality** This GitHub Actions workflow automates testing and code quality checks for the Python project whenever changes are pushed or pull requests are created against the `main` or `develop` branches. **Key Features:** - **Multi-Version Testing:** Runs tests using Python 3.11 and 3.12. - **Dependency Installation:** Automatically installs project dependencies from `requirements.txt`. - **Code Linting:** Uses Flake8 to identify syntax errors, undefined names, and code-quality issues. - **Automated Testing:** Executes the test suite using Pytest, including asynchronous tests and code coverage measurement. - **Coverage Reporting:** Uploads test coverage reports to Codecov. - **Code Formatting:** Uses Black to check Python code formatting. - **Import Validation:** Uses isort to verify import ordering. - **Code Analysis:** Uses Pylint and MyPy for code-quality and type-checking analysis. - **Workflow Optimization:** Includes dependency caching, execution timeouts, restricted permissions, and cancellation of outdated workflow runs. This workflow helps maintain code reliability, consistency, and quality through automated testing and continuous integration.
Reviewer's GuideConfigurationUpdate the CI workflow’s triggers, permissions, concurrency, timeouts, dependency caching, action versions, and test and code-quality steps.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
👋 Thanks for opening this PR! A maintainer will review it soon. In the meantime, please make sure you've read CONTRIBUTING.md and filled out the PR template, including screenshots for any visual changes. |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/ci.yml" line_range="49" />
<code_context>
- pip install -r requirements.txt
-
- - name: Lint with flake8
- continue-on-error: true
- run: |
- pip install flake8
</code_context>
<issue_to_address>
**Quality violations still pass CI**
When a linter or type checker reports a violation, each lint and quality-check step is marked `continue-on-error: true`, so violations leave the workflow green and code with reported quality issues can merge without a failing check.
Remove `continue-on-error: true` from checks that are intended to block merges, or describe them as informational rather than enforcing quality checks.
Also at `.github/workflows/ci.yml:95`, `.github/workflows/ci.yml:99`, `.github/workflows/ci.yml:103`, `.github/workflows/ci.yml:107`.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: .github/workflows/ci.yml:49
| pip install flake8 pytest pytest-asyncio pytest-cov | ||
|
|
||
| - name: Lint with flake8 | ||
| continue-on-error: true |
There was a problem hiding this comment.
🟡 Medium · Quality violations still pass CI
When a linter or type checker reports a violation, each lint and quality-check step is marked continue-on-error: true, so violations leave the workflow green and code with reported quality issues can merge without a failing check.
Remove continue-on-error: true from checks that are intended to block merges, or describe them as informational rather than enforcing quality checks.
Also at .github/workflows/ci.yml:95, .github/workflows/ci.yml:99, .github/workflows/ci.yml:103, .github/workflows/ci.yml:107.
Prompt for AI agents
In `.github/workflows/ci.yml` at line 49:
**Quality violations still pass CI**
When a linter or type checker reports a violation, each lint and quality-check step is marked `continue-on-error: true`, so violations leave the workflow green and code with reported quality issues can merge without a failing check.
Remove `continue-on-error: true` from checks that are intended to block merges, or describe them as informational rather than enforcing quality checks.
Also at `.github/workflows/ci.yml:95`, `.github/workflows/ci.yml:99`, `.github/workflows/ci.yml:103`, `.github/workflows/ci.yml:107`.
DevSidd2006
left a comment
There was a problem hiding this comment.
Thanks for modernizing the CI workflow. Before merging, please address these issues:
- The Flake8, Black, isort, Pylint, and MyPy steps all use continue-on-error: true. Consequently, quality violations still leave CI green. Please remove this setting from checks intended to block merges, or clearly label them as advisory.
- Please upgrade codecov/codecov-action@v5 to @v7 (or at least @v6). GitHub-hosted runners have moved to Node 24, while Codecov v6+ provides Node 24 support.
The PR’s CI workflow is also awaiting maintainer approval and has not run yet. Please ensure the Python 3.11/3.12 matrix passes after these changes.
CI/CD Pipeline – Automated Testing and Code Quality
This GitHub Actions workflow automates testing and code quality checks for the Python project whenever changes are pushed or pull requests are created against the
mainordevelopbranches.Key Features:
requirements.txt.This workflow helps maintain code reliability, consistency, and quality through automated testing and continuous integration.
Description
Please include a summary of the change and which issue it fixes. Include relevant motivation and context.
Fixes # (issue)
Screenshots (if visual change)
For any UI/visual change, add before & after screenshots or a short GIF.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions so we can reproduce.
pytest tests/ -v)LLM_PROVIDER=mock)pages/(if applicable)Checklist:
Summary by Sourcery
Modernize the CI/CD pipeline for more secure, efficient, and resilient automated testing and code-quality checks.
Enhancements:
CI: