Skip to content

Feat/add ci quality gates#223

Merged
AAdewunmi merged 3 commits into
mainfrom
feat/add-CI-quality-gates
Apr 22, 2026
Merged

Feat/add ci quality gates#223
AAdewunmi merged 3 commits into
mainfrom
feat/add-CI-quality-gates

Conversation

@AAdewunmi

Copy link
Copy Markdown
Owner

Summary

Adds CI quality gates for formatting, linting, migrations, tests, and coverage through GitHub Actions.

Changes

  • added a GitHub Actions CI workflow for automated validation
  • configured PostgreSQL for the CI test job
  • installed development dependencies in the workflow
  • added Django migration execution before tests
  • added Ruff lint checks
  • added Black format checks
  • added pytest execution with centralized coverage settings from pyproject.toml
  • added Codecov upload for coverage.xml
  • centralized pytest and coverage policy in pyproject.toml
  • added formatter and linter exclusions for Django migrations
  • removed legacy pytest.ini and .coveragerc in favor of one shared project config
  • aligned the Makefile coverage target with centralized pytest settings

Behavior

CI now runs the same validation flow on every push and pull request. The workflow installs dependencies, starts PostgreSQL, runs migrations, checks Ruff and Black, then runs pytest using the repository’s shared test and coverage configuration.

Why

This creates a consistent quality gate for branch updates and PRs while reducing configuration drift between local development and GitHub Actions. It also fixes the previous formatter/config precedence issue caused by overlapping config files and incomplete Black exclusions.

Validation

The workflow is configured to run:

  • python manage.py migrate
  • ruff check .
  • black --check .
  • pytest -q

Pytest coverage policy is now sourced from pyproject.toml, including XML output and the minimum coverage threshold.

Result

The repository now has a single source of truth for test and coverage behavior, and CI enforces formatting, linting, migrations, tests, and coverage consistently.

Notes

  • pyproject.toml now owns pytest and coverage configuration
  • Black and Ruff retain their default exclusions while additionally skipping Django migrations
  • pytest.ini and .coveragerc were removed to prevent config precedence conflicts
  • Codecov upload still depends on the configured CODECOV_TOKEN secret

@AAdewunmi AAdewunmi self-assigned this Apr 22, 2026
@AAdewunmi AAdewunmi added the sprint-7-ci-tests Codify coverage threshold label Apr 22, 2026
@AAdewunmi AAdewunmi linked an issue Apr 22, 2026 that may be closed by this pull request
@codecov

codecov Bot commented Apr 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AAdewunmi AAdewunmi merged commit cbadfb0 into main Apr 22, 2026
5 checks passed
@AAdewunmi AAdewunmi deleted the feat/add-CI-quality-gates branch April 22, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sprint-7-ci-tests Codify coverage threshold

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Codify coverage threshold

1 participant