|
|
3 mesi fa | |
|---|---|---|
| .. | ||
| README.md | 3 mesi fa | |
| test.yml | 3 mesi fa | |
This directory contains GitHub Actions workflows for continuous integration and continuous deployment (CI/CD) of the RAG System.
test.yml)The main testing workflow that runs on every push and pull request to main and develop branches.
Test Job
Lint Job
flake8: Python lintingblack: Code formatting checkisort: Import sorting checkmypy: Static type checkingSecurity Job
safety: Checks for known security vulnerabilities in dependenciesbandit: Scans code for common security issuesBuild Status Job
pytest tests/unit -v --cov=src --cov-report=xml --cov-report=term -m unit
pytest tests/integration -v --cov=src --cov-append --cov-report=xml --cov-report=term -m integration
pytest tests/e2e -v --cov=src --cov-append --cov-report=xml --cov-report=term -m e2e
Tests are organized using pytest markers:
unit: Unit tests (isolated component tests)integration: Integration tests (component interaction tests)e2e: End-to-end tests (complete workflow tests)slow: Tests that take > 1 secondrequires_db: Tests requiring database connectionrequires_vector_db: Tests requiring vector databaserequires_external_service: Tests requiring external servicesproperty: Property-based tests using Hypothesispytest
# Unit tests only
pytest -m unit
# Integration tests only
pytest -m integration
# E2E tests only
pytest -m e2e
# Exclude slow tests
pytest -m "not slow"
# Generate HTML coverage report
pytest --cov=src --cov-report=html
# Generate terminal coverage report
pytest --cov=src --cov-report=term
# Generate XML coverage report (for CI/CD)
pytest --cov=src --cov-report=xml
CODECOV_TOKENAdd to your README.md:
[](https://codecov.io/gh/YOUR_USERNAME/YOUR_REPO)
coverage.xml: XML coverage reporthtmlcov/: HTML coverage reporttests/logs/pytest.log: Detailed test execution logsbandit-report.json: Security scan resultsCODECOV_TOKEN is set correctlycoverage.xml is generatedpytest-xdist