Skip to content

Commit 878d57d

Browse files
authored
Merge pull request #67 from bids-standard/add-codecov-config
Add Codecov configuration for PR coverage reporting
2 parents e2e56d4 + 804f8c5 commit 878d57d

4 files changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/build-test-deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
on:
22
push:
3+
branches:
4+
- main
5+
- maint/*
36
pull_request:
4-
branches: [main]
7+
branches:
8+
- main
9+
- maint/*
510
release:
611
types:
712
- published

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 80%
6+
patch:
7+
default:
8+
target: 80%
9+
10+
comment:
11+
layout: "condensed_header, diff, flags, components"
12+
require_changes: true

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,18 @@ parentdir_prefix = ""
6262

6363
[tool.pytest.ini_options]
6464
minversion = "6"
65-
testpaths = ["tests"]
65+
testpaths = ["src", "tests"]
6666
log_level = "INFO"
6767
xfail_strict = true
6868
addopts = ["-ra", "--strict-config", "--strict-markers"]
69-
filterwarnings = ["error"]
69+
filterwarnings = ["error", "ignore::pytest.PytestUnraisableExceptionWarning", "ignore::SyntaxWarning:datalad*"]
7070
norecursedirs = ["data"]
7171
doctest_optionflags = ["NORMALIZE_WHITESPACE", "IGNORE_EXCEPTION_DETAIL"]
7272

7373
[tool.coverage.run]
7474
branch = true
7575
parallel = true
76-
source = ["bids_validator", "tests"]
76+
source = ["src", "tests"]
7777
omit = [
7878
"setup.py",
7979
"*/_version.py",

tox.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ deps =
6060
pre: git+https://github.com/bids-standard/bids-specification.git\#subdirectory=tools/schemacode
6161

6262
commands =
63+
# Avoid SyntaxWarning being promoted to SyntaxError in Python 3.14, Datalad up to 1.3.2.
64+
python -c 'import datalad'
6365
coverage erase
6466
coverage run -p -m bids_validator tests/data/bids-examples/ds000117
6567
python -m pytest --doctest-modules --cov . --cov-append --cov-report term \

0 commit comments

Comments
 (0)