Skip to content

[Feature]: Add Automated Python Backend Testing to CI Workflow PipelineΒ #458

@Tushar15769

Description

@Tushar15769

πŸ“Œ Description

The current CI workflow only validates frontend-related checks and does not execute backend Python tests. This leaves the FastAPI backend unverified during pull requests and deployments, increasing the risk of shipping broken API logic, failing integrations, or regression issues.

Additionally, the project currently lacks a dedicated requirements-dev.txt file for development and testing dependencies such as pytest and httpx, making backend test setup inconsistent across environments.

The CI pipeline should include a separate backend testing job that installs Python dependencies, resolves the existing requirements.txt merge conflict, and runs automated test suites using pytest.


🎯 Objective

Python test execution into the CI pipeline.

This will:

Catch backend regressions earlier
Improve API stability
Ensure FastAPI endpoints are validated during PR checks
Standardize backend testing dependencies
Improve overall DevOps workflow quality


πŸ› οΈ Proposed Solution

Add a second backend job inside test.yml
Configure Python environment setup in GitHub Actions
Resolve existing requirements.txt dependency conflicts
Add a dedicated requirements-dev.txt
Install:
pytest
httpx
Execute backend tests automatically using pytest


πŸ“Œ Features to Include

Python backend CI job
Automated FastAPI endpoint testing
Development dependency management
Separate backend workflow validation
Clear CI logs for backend test failures


πŸ”„ Alternatives Considered

Running backend tests manually before deployment
Combining frontend and backend jobs into a single workflow step
Using production dependencies for testing

These approaches reduce maintainability and increase deployment risk.


πŸ§ͺ Acceptance Criteria

  • Backend test job added to test.yml
  • Python dependencies install successfully
  • requirements-dev.txt added
  • pytest executes successfully in CI
  • FastAPI test client works with httpx
  • CI fails correctly on backend test failures
  • Workflow documentation updated

πŸ“· Screenshots / References (if any)

N/A


πŸ“’ Contribution Guidelines

  • Comment "assign me" to work on this issue
  • Wait for assignment before starting
  • Follow project coding standards
  • Submit a clean PR with description

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions