Skip to content

Feat : ci add dedicated backend test workflow#780

Open
antharya05 wants to merge 2 commits into
imDarshanGK:mainfrom
antharya05:feat/backend-ci-tests
Open

Feat : ci add dedicated backend test workflow#780
antharya05 wants to merge 2 commits into
imDarshanGK:mainfrom
antharya05:feat/backend-ci-tests

Conversation

@antharya05
Copy link
Copy Markdown
Contributor

Description

This PR refactors and improves the backend CI workflow structure by introducing a dedicated backend testing workflow with cleaner ownership, better reliability, optimized execution, and improved Python environment consistency.

Main Improvements

  • Added a dedicated backend workflow:

    • .github/workflows/backend-tests.yml
  • Separated backend responsibilities from the general CI workflow.

  • Added backend-specific path triggers so backend jobs only run when backend-related files change.

  • Added:

    • timeout-minutes
    • fail-fast: false
    • python -m pytest
    • python -m pip install --upgrade pip
  • Added cleaner workflow structure using:

    defaults:
      run:
        working-directory: backend
  • Removed duplicated backend execution from ci.yml.

  • Kept workflows intentionally lightweight and maintainable without overengineering.

Why These Changes Matter

During local verification, I encountered an interpreter mismatch issue between:

  • installed dependencies
  • pytest executable resolution
  • active Python environment

Switching to:

python -m pytest

ensures pytest always runs using the active interpreter environment, improving CI reliability.

The new structure also reduces unnecessary GitHub Actions runs and makes workflow ownership clearer as the repository grows.


Related Issue

Fixes #481


Type of change

  • Refactor
  • Test addition

Checklist

  • I have read CONTRIBUTING.md
  • My branch is up to date with main
  • I have run pytest -v and all tests pass
  • I have not introduced duplicate issues or features
  • My PR title follows the format: feat/fix/docs/test: short description
  • No hardcoded secrets or API keys in my code
  • This PR is linked to a GSSoC 2026 issue

Test evidence

py -3.12 -m pytest -v --tb=short

==========================================================
372 passed, 1 warning
==========================================================

@antharya05 antharya05 requested a review from imDarshanGK as a code owner June 2, 2026 11:46
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.

Add CI job to run backend unit tests

1 participant