Skip to content

Commit

Permalink
Move coverage configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
replaceafill committed Aug 15, 2024
1 parent a1629a1 commit 6ae11b0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
make -C hack/ test-${{ matrix.rule }}
env:
TOXARGS: -vv
PYTEST_ADDOPTS: -vv --cov /src/src/ --cov-config=/src/.coveragerc --cov-report xml:/src/coverage.xml
PYTEST_ADDOPTS: -vv --cov --cov-config=/src/pyproject.toml --cov-report xml:/src/coverage.xml
PYTHON_VERSION: ${{ matrix.python-version }}
- name: "Upload coverage report"
if: matrix.rule != 'storage-service' && matrix.rule != 'migrations' && github.repository == 'artefactual/archivematica'
Expand Down
20 changes: 20 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ addopts = "--reuse-db -p no:cacheprovider"
DJANGO_SETTINGS_MODULE="settings.test"
norecursedirs = ".svn _build tmp* node_modules bower_components share .tox"

[tool.coverage.run]
omit = [
"**/src/archivematicaCommon/lib/externals/*",
"**/migrations/*",
"**/south_migrations/*",
"**/management/commands/*",
"**/settings/*",
"**/tests/*",
"**/wsgi.py",
"**/manage.py",
]
include = [
"**/src/archivematicaCommon/lib/*",
"**/src/dashboard/src/*",
"**/src/MCPClient/lib/*",
"**/src/MCPClient/lib/clientScripts/*",
"**/src/MCPServer/lib/*",
]
branch = true

[tool.ruff.lint]
# Rule reference: https://docs.astral.sh/ruff/rules/
select = [
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt

coverage
coverage[toml]
git+https://github.com/artefactual-labs/[email protected]#egg=mockldap
pip-tools
pytest
Expand Down

0 comments on commit 6ae11b0

Please sign in to comment.