Skip to content

Feat/add ci quality gates#222

Closed
AAdewunmi wants to merge 3 commits into
mainfrom
feat/add-CI-quality-gates
Closed

Feat/add ci quality gates#222
AAdewunmi wants to merge 3 commits into
mainfrom
feat/add-CI-quality-gates

Conversation

@AAdewunmi

Copy link
Copy Markdown
Owner

Summary

Adds CI quality gates in GitHub Actions so every branch push and pull request runs the same validation workflow.

Changes

  • added a GitHub Actions CI workflow for automated validation
  • configured a PostgreSQL service for the test job
  • set CI environment variables required by this Django project
  • installed development dependencies in the workflow
  • added a migration step before running tests
  • added ruff check .
  • added black --check .
  • added pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=85 -q
  • added Codecov upload for coverage.xml
  • updated workflow triggers to run on all branch pushes and pull requests

Behavior

On every push and every pull request, GitHub Actions now runs the same CI job against the repository. The workflow starts PostgreSQL, installs dependencies, applies migrations, checks lint and formatting, then runs the test suite with coverage enforcement.

Why

This creates a consistent merge gate across branch updates instead of relying only on local checks or PR timing. It reduces the chance of formatting issues, lint violations, migration drift, or test regressions landing unnoticed.

Validation

The workflow is configured to run:

  • python manage.py migrate
  • ruff check .
  • black --check .
  • pytest --cov=. --cov-report=term-missing --cov-report=xml --cov-fail-under=85 -q

Result

Every branch update now receives the same automated quality checks, with coverage reported and enforced in CI.

Notes

  • the workflow now triggers on all push events, not just selected branches
  • Codecov upload requires the configured CODECOV_TOKEN secret in GitHub
  • the repo’s CI uses DJANGO_SECRET_KEY and POSTGRES_* variables rather than SECRET_KEY or DATABASE_URL

@AAdewunmi AAdewunmi self-assigned this Apr 22, 2026
@AAdewunmi AAdewunmi added the sprint-7-ci-tests-backend Add CI quality gates 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 closed this Apr 22, 2026
@AAdewunmi AAdewunmi deleted the feat/add-CI-quality-gates branch April 22, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sprint-7-ci-tests-backend Add CI quality gates

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

Add CI quality gates

1 participant