Skip to content

Commit 9dcb61f

Browse files
authored
ci(coverage): Migrate .coveragerc to pyproject.toml (#384)
2 parents bb7a30c + b59e2bd commit 9dcb61f

File tree

4 files changed

+30
-17
lines changed

4 files changed

+30
-17
lines changed

.coveragerc

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ jobs:
3434
run: poetry run flake8
3535

3636
- name: Test with pytest
37-
run: poetry run py.test --cov=./ --cov-report=xml
37+
run: poetry run py.test --cov=./ --cov-append --cov-report=xml
38+
env:
39+
COV_CORE_SOURCE: .
40+
COV_CORE_CONFIG: pyproject.toml
41+
COV_CORE_DATAFILE: .coverage.eager
3842

39-
- uses: codecov/codecov-action@v2
43+
- uses: codecov/codecov-action@v3
4044
with:
4145
token: ${{ secrets.CODECOV_TOKEN }}
4246

CHANGES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ $ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force
5757

5858
- Remove unused `.tmuxp-before-script.sh`, which was used as a `before_script`
5959
in `.tmuxp.yaml`
60+
- Move `.coveragerc` into `pyproject.toml` (#384)
6061

6162
## vcspull 1.12.3 (2022-06-01)
6263

pyproject.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,29 @@ coverage = ["codecov", "coverage", "pytest-cov"]
113113
format = ["black", "isort"]
114114
lint = ["flake8", "flake8-bugbear", "flake8-comprehensions", "mypy"]
115115

116+
[tool.coverage.run]
117+
branch = true
118+
parallel = true
119+
omit = [
120+
"*/_*",
121+
"*/_compat.py",
122+
"docs/conf.py",
123+
]
124+
125+
[tool.coverage.report]
126+
show_missing = true
127+
skip_covered = true
128+
exclude_lines = [
129+
"pragma: no cover",
130+
"def __repr__",
131+
"raise NotImplementedError",
132+
"return NotImplemented",
133+
"def parse_args",
134+
"if TYPE_CHECKING:",
135+
"if t.TYPE_CHECKING:",
136+
"@overload( |$)",
137+
]
138+
116139
[build-system]
117140
requires = ["poetry_core>=1.0.0", "setuptools>50"]
118141
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)