Skip to content

Upgrade CI/CD workflow to use latest actions - #83

Open
jeniferalaquoke wants to merge 1 commit into
DevSidd2006:mainfrom
jeniferalaquoke:patch-1
Open

jeniferalaquoke wants to merge 1 commit into
DevSidd2006:mainfrom
jeniferalaquoke:patch-1

Conversation

@jeniferalaquoke

@jeniferalaquoke jeniferalaquoke commented Nov 13, 2026 •

Copy link
Copy Markdown

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.

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.

Before After

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring / Code cleanup

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Include instructions so we can reproduce.

  • Automated tests run locally (pytest tests/ -v)
  • Tested in mock mode without external API keys (LLM_PROVIDER=mock)
  • UI tested across pages/ (if applicable)

Checklist:

  • I have performed a self-review of my own code
  • New and existing unit tests pass locally with my changes
  • I have not committed any secrets, API keys, credentials, or personal candidate data
  • AI tools are welcome, but I've reviewed and verified all AI-assisted content myself
  • For visual/UI changes, I've included before/after screenshots or a GIF above

Summary by Sourcery

Modernize the CI/CD pipeline for more secure, efficient, and resilient automated testing and code-quality checks.

Enhancements:

  • Modernize the CI/CD workflow with current GitHub Actions, pip caching, manual dispatch, concurrency cancellation, timeouts, and restricted permissions.
  • Retain automated testing across Python 3.11 and 3.12 with linting, coverage reporting, formatting, import, quality, and type checks.

CI:

  • Update CI validation and coverage reporting to use the latest supported action versions and ensure coverage uploads run after test failures when possible.

**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.
@sourcery-ai

sourcery-ai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Update the CI workflow’s triggers, permissions, concurrency, timeouts, dependency caching, action versions, and test and code-quality steps.

  • .github/workflows/ci.yml L1, L6-25, L30-108

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions

Copy link
Copy Markdown

👋 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.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread .github/workflows/ci.yml
pip install flake8 pytest pytest-asyncio pytest-cov

- name: Lint with flake8
continue-on-error: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 DevSidd2006 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for modernizing the CI workflow. Before merging, please address these issues:

  1. 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.
  2. 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.

This branch has not been deployed

No deployments
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.

2 participants