Skip to content

ci: Fix coverage reporting and update bages #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ DJANGO_SECRET_KEY=your_django_secret_key
DJANGO_ALLOWED_HOSTS=localhost,127.0.0.1,0.0.0.0

POSTGRES_DATABASE=your_postgres_database_name
POSTGRES_HOST=db
POSTGRES_PASSWORD=your_postgres_password
POSTGRES_PORT=5432
POSTGRES_USERNAME=your_postgres_username
POSTGRES_HOST=db
POSTGRES_PORT=5432


REDIS_HOST=redis
REDIS_PORT=6379
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ jobs:
- name: Run tests and generate coverage report 🛡️
run: >
docker compose exec -T web sh -c
"cd promo_code && coverage run manage.py test && coverage xml"
"cd promo_code && coverage run --rcfile=.coveragerc manage.py test && coverage xml"

- name: Copy coverage report from container 📂
run: docker compose cp web:/usr/src/app/promo_code/coverage.xml ./coverage.xml

- name: Upload coverage to Codecov 🚀
uses: codecov/codecov-action@v5
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Promo Code API

[![CI/CD](https://github.com/RandomProgramm3r/Promo-Code-API/actions/workflows/linting.yml/badge.svg)](https://github.com/RandomProgramm3r/Promo-Code-API/actions)
[![CI/CD](https://github.com/RandomProgramm3r/Promo-Code-API/actions/workflows/ci.yml/badge.svg)](https://github.com/RandomProgramm3r/Promo-Code-API/actions)
[![codecov](https://codecov.io/github/RandomProgramm3r/Promo-Code-API/branch/main/graph/badge.svg?token=VNBK0FAU3Z)](https://codecov.io/github/RandomProgramm3r/Promo-Code-API)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![codecov](https://codecov.io/github/RandomProgramm3r/Promo-Code-API/graph/badge.svg?token=VNBK0FAU3Z)](https://codecov.io/github/RandomProgramm3r/Promo-Code-API)

The application provides an HTTP API for companies and end-users, is integrated with an external anti-fraud service, and uses PostgreSQL and Redis for data storage and caching.

Expand Down