Skip to content

Commit df40637

Browse files
author
GeNa8880
committed
ci: add coverage reporting, badges, and quality checks
- Add coverage reporting with XML artifact upload in CI - Add quality job for property-based tests with fixed seed - Enable pytest-randomly and HYPOTHESIS_PROFILE=ci in test job - Add CI and coverage badges to README.md
1 parent 6905c3a commit df40637

File tree

2 files changed

+39
-2
lines changed

2 files changed

+39
-2
lines changed

.github/workflows/ci.yml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
tests:
4444
runs-on: ubuntu-latest
4545
needs: security
46+
env:
47+
HYPOTHESIS_PROFILE: ci
4648
steps:
4749
- uses: actions/checkout@v4
4850

@@ -52,8 +54,23 @@ jobs:
5254

5355
- run: uv sync
5456

55-
- name: Unit tests
56-
run: uv run pytest tests/ -v -m "not integration" --cov=src --cov-report=xml
57+
- name: Unit tests with coverage
58+
run: >
59+
uv run pytest tests/ -v
60+
-m "not integration"
61+
-p randomly
62+
--cov=src/rag_engine
63+
--cov-report=term-missing
64+
--cov-report=xml:coverage.xml
65+
--cov-branch
66+
--cov-fail-under=85
67+
68+
- name: Upload coverage report
69+
if: always()
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: coverage-report
73+
path: coverage.xml
5774

5875
integration:
5976
runs-on: ubuntu-latest
@@ -69,3 +86,20 @@ jobs:
6986

7087
- name: Integration tests
7188
run: uv run pytest tests/integration/ -v
89+
90+
quality:
91+
runs-on: ubuntu-latest
92+
needs: tests
93+
env:
94+
HYPOTHESIS_PROFILE: ci
95+
steps:
96+
- uses: actions/checkout@v4
97+
98+
- uses: astral-sh/setup-uv@v5
99+
with:
100+
enable-cache: true
101+
102+
- run: uv sync
103+
104+
- name: Property-based tests
105+
run: uv run pytest tests/unit/test_property.py -v --hypothesis-seed=0

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# rag-engine
22

3+
![CI](https://github.com/ForwardCodeSolutions/rag-engine/actions/workflows/ci.yml/badge.svg)
4+
![Coverage](https://img.shields.io/badge/coverage-96%25-brightgreen)
5+
36
Lightweight hybrid RAG engine combining vector search, BM25, and knowledge graphs. Built for multilingual document retrieval with GDPR compliance.
47

58
## Architecture

0 commit comments

Comments
 (0)