Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Comment on lines +49 to +52
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ coverage.xml
.hypothesis/
.pytest_cache/
cover/
junit.xml

# Translations
*.mo
Expand Down Expand Up @@ -136,4 +137,4 @@ dmypy.json
cython_debug/

# testing
test.py
test.py
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +24 to +28
- `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)

<!-- filigran-conventions:start -->
## Commit, pull request & issue conventions

Expand Down
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -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*/**"
Loading