From 3aae7578fda1d8eb4cb6bb7fc016b876324f40bb Mon Sep 17 00:00:00 2001 From: guzmud Date: Fri, 12 Jun 2026 09:43:24 +0200 Subject: [PATCH 1/3] ci(coverage): add codecov configuration file at the root of the repository (#239) --- codecov.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..92b4a7f --- /dev/null +++ b/codecov.yml @@ -0,0 +1,19 @@ +coverage: + status: + project: + default: + target: auto + informational: true + patch: + default: + target: 80% + informational: false + +comment: + layout: "diff, files, condensed_footer" + hide_project_coverage: true # set to true + require_changes: "coverage_drop AND uncovered_patch" + +ignore: + # Ignore any folder whose name starts with "test" anywhere in the tree + - "**/test*/**" \ No newline at end of file From 9291bce10f3935ec617a8fa4caf93238f1663268 Mon Sep 17 00:00:00 2001 From: guzmud Date: Fri, 12 Jun 2026 11:54:51 +0200 Subject: [PATCH 2/3] ci(coverage): adding junit.xml export and upload in codecov (#239) --- .github/workflows/coverage.yml | 11 +++++++++-- .gitignore | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 73b47f6..b0ca285 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -27,7 +27,7 @@ jobs: uv venv && uv pip install -e '.[dev]' coverage - name: Run tests with coverage - run: uv run coverage run -m pytest + run: uv run coverage run -m pytest --junitxml="junit.xml" - name: Print coverage summary run: uv run coverage report -m --fail-under=70 @@ -40,6 +40,13 @@ jobs: uses: codecov/codecov-action@v7 with: token: ${{ secrets.CODECOV_TOKEN }} - flags: connectors + flags: pyoaev fail_ci_if_error: false verbose: true + + - name: Upload test results to Codecov + if: ${{ !cancelled() && hashFiles('junit.xml') != '' }} + uses: codecov/codecov-action@v7 + with: + token: ${{ secrets.CODECOV_TOKEN }} + report_type: test_results diff --git a/.gitignore b/.gitignore index 0b76752..82c5d07 100644 --- a/.gitignore +++ b/.gitignore @@ -70,6 +70,7 @@ coverage.xml .hypothesis/ .pytest_cache/ cover/ +junit.xml # Translations *.mo @@ -136,4 +137,4 @@ dmypy.json cython_debug/ # testing -test.py \ No newline at end of file +test.py From 50a90a95dd04d43019de2b8fcd874d278de793ab Mon Sep 17 00:00:00 2001 From: guzmud Date: Fri, 12 Jun 2026 11:55:38 +0200 Subject: [PATCH 3/3] ci(coverage): updating CONTRIBUTING to reflect CI constraints (#239) --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 17851e5..0b0d564 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,15 @@ developing features or fixing bugs yourself. * If you are interested in contributing code, fork the repository, create a branch, and open a pull request. +## Code quality and testing + +In order to maintain a certain standard regarding code quality, this repository CI will run various tools against expectations: +- `isort` will be used to check for proper imports sorting, and the CI will fail if the checks fail +- `black` will be used to check for proper code formatting, and the CI will fail if the checks fail +- `flake8` will be used to check for proper code styling, and the CI will fail if the checks fail +- `pytest` will be used to run various levels of testing, and the CI will fail if the tests fail +- `coverage` with `codecov` will be used to check for proper code coverage, and the CI will fail if the level is below 80% for the current diff (a warning will be emitted if the level falls below 80% for the overall project) + ## Commit, pull request & issue conventions