Add code coverage tracking and reporting to CI pipeline#274
Merged
Edwardvaneechoud merged 4 commits intomainfrom Jan 29, 2026
Merged
Add code coverage tracking and reporting to CI pipeline#274Edwardvaneechoud merged 4 commits intomainfrom
Edwardvaneechoud merged 4 commits intomainfrom
Conversation
- Add pytest-cov dependency to dev dependencies - Configure coverage settings in pyproject.toml (source paths, omit patterns, report options) - Update CI workflow to collect coverage on Ubuntu Python 3.12 matrix entry - Generate combined coverage report with GitHub Actions job summary - Upload coverage XML artifact and integrate with Codecov - Add coverage artifacts to .gitignore https://claude.ai/code/session_01M4NiHP9EDNkLtMFjXpjEvb
✅ Deploy Preview for flowfile-wasm canceled.
|
… together Set importmode = "importlib" in pytest config to avoid module naming collisions between flowfile_core/tests/conftest.py and flowfile_worker/tests/conftest.py. Also fix the section name from [pytest] to [tool.pytest.ini_options] which is the correct key for pyproject.toml. https://claude.ai/code/session_01M4NiHP9EDNkLtMFjXpjEvb
importmode=importlib is incompatible with the existing `from tests.` imports in both test suites. The test directories use __init__.py and cross-reference via `from tests.utils import ...`, which requires pytest's default sys.path manipulation. Instead, add a `make test_coverage` target that runs core and worker test suites sequentially (separate pytest processes), combining coverage with --cov-append. This avoids the conftest collision and matches the CI approach. https://claude.ai/code/session_01M4NiHP9EDNkLtMFjXpjEvb
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds comprehensive code coverage tracking to the CI/CD pipeline, enabling visibility into test coverage for the backend services and integration with Codecov for coverage monitoring.
Key Changes
flowfile_coreandflowfile_workertests to collect coverage data usingpytest-cov, but only on Ubuntu with Python 3.12 to avoid redundant collectioncoverage.xmland.coveragefiles for downstream processing and archivalpytest-covdependency and comprehensive coverage configuration inpyproject.tomlincluding:flowfile_coreandflowfile_workerpackages.coverage,coverage.xml,htmlcov/) to.gitignoreImplementation Details
matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'to optimize CI performance by running once per test suite--cov-appendflag allows coverage data from multiple test runs to be combined into a single reportfail_ci_if_error: false) to prevent CI failures due to external service issues