From 624b1ddb57dcfef5f4489c347a4e4649316b4548 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 18:03:47 +0000 Subject: [PATCH] fix(ci): exclude E2E tests requiring Docker-in-Docker from CI - Add missing pytest markers (e2e, requires_docker) to pyproject.toml - Update CI workflow to skip E2E tests with -m "not e2e" - Update integration test documentation with CI configuration notes - E2E tests can still be run locally with: pytest -m e2e Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com> --- .github/workflows/tests.yaml | 5 ++++- pyproject.toml | 2 ++ tests/README_INTEGRATION_TESTS.md | 24 +++++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f7aea8c2..4bb89e40 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -40,7 +40,10 @@ jobs: pip install -r requirements-dev.txt - name: Run Tests - run: pytest tests/ -v --cov=app --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy + # Exclude E2E tests (-m "not e2e") as they require Docker-in-Docker (testcontainers) + # which isn't well-supported in GitHub Actions without additional DinD configuration. + # E2E tests can be run locally with: pytest -m e2e + run: pytest tests/ -v --cov=app --cov-report=xml --cov-report=term --junitxml=junit.xml -o junit_family=legacy -m "not e2e" - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 diff --git a/pyproject.toml b/pyproject.toml index 178cd7f8..e9db13bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -156,6 +156,8 @@ markers = [ "requires_external: Tests requiring external services (OpenAI, Azure, etc.)", "requires_db: Tests requiring database", "requires_redis: Tests requiring Redis", + "e2e: End-to-end tests with full infrastructure (requires Docker)", + "requires_docker: Tests requiring Docker containers (testcontainers)", ] # mypy configuration diff --git a/tests/README_INTEGRATION_TESTS.md b/tests/README_INTEGRATION_TESTS.md index 8b5e0abc..7bdd9e93 100644 --- a/tests/README_INTEGRATION_TESTS.md +++ b/tests/README_INTEGRATION_TESTS.md @@ -359,7 +359,29 @@ docker volume prune -f ## CI/CD Integration -### GitHub Actions Example +### GitHub Actions - Current Configuration + +The DocuElevate CI workflow (`.github/workflows/tests.yaml`) **excludes E2E tests** by default because they require Docker-in-Docker (testcontainers), which requires additional configuration in GitHub Actions. + +```yaml +- name: Run Tests + # Exclude E2E tests - they require Docker-in-Docker (testcontainers) + run: pytest tests/ -v --cov=app -m "not e2e" +``` + +**To run E2E tests locally:** +```bash +pytest -m e2e -v +``` + +**To run all tests including E2E locally:** +```bash +pytest tests/ -v +``` + +### GitHub Actions with E2E Support (Optional) + +If you want to enable E2E tests in CI, you need Docker-in-Docker setup: ```yaml name: Integration Tests