-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Problem
Currently, the project lacks an automated way to ensure code quality and prevent regressions. Every contribution must be manually checked for formatting (Black, isort) and verified through tests. This slows down the development cycle and increases the risk of introducing bugs.
Proposed Solution
Implement a GitHub Actions workflow that automatically runs on every Push and Pull Request to the main and develop branches. This workflow will perform formatting checks, linting, type-checking, and execute the test suite.
User Stories
- As a developer, I want my code to be automatically formatted and validated so that I can focus on features rather than style.
- As a maintainer, I want to ensure that all incoming PRs pass quality checks and tests before being merged.
Acceptance Criteria
- GitHub Actions workflow file
.github/workflows/ci.ymlis created. - Workflow triggers on push and PR to
mainanddevelop. - Linting Step: Runs
black --check .andisort --check-only .. - Type Checking Step: Runs
mypy app. - Test Step: Runs
pytestwith code coverage. - Workflow fails if any step fails.
- A status badge is added to the README.
Proposed Technical Details
- Use
actions/checkout@v4for repository access. - Use
actions/setup-python@v5with caching for dependencies. - Install dependencies from
requirements.txt. - Configure
pytestto fail if coverage falls below a certain threshold (e.g., 80%). - Environment variables for tests (DB connection, etc.) should be handled via a mock or a test database container if needed.
Tasks
- Initialize
.github/workflows/ci.yml. - Add linting jobs (Black, isort).
- Add type-checking job (mypy).
- Add testing job (pytest).
- Verify workflow locally using
actor by pushing to a branch. - Add CI badge to README.md.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels