Skip to content

Commit

Permalink
Merge pull request #6837 from jenshnielsen/jenshnielsen/silence_warning
Browse files Browse the repository at this point in the history
Set coverage config in pyproject.toml
  • Loading branch information
jenshnielsen authored Feb 19, 2025
2 parents 7d634b3 + 7d8ffa4 commit 479f2d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ jobs:
if: ${{ !matrix.min-version }}
- name: Run parallel tests
run: |
pytest -m "not serial" --cov=qcodes --cov-report xml --hypothesis-profile ci --durations=20 $PYTEST_OPT tests
pytest -m "not serial" --cov --cov-report xml --hypothesis-profile ci --durations=20 $PYTEST_OPT tests
# a subset of the tests fails when run in parallel on Windows so run those in serial here
- name: Run serial tests
run: |
pytest -m "serial" -n 0 --dist no --cov=qcodes --cov-report xml --cov-append --hypothesis-profile ci $PYTEST_OPT tests
pytest -m "serial" -n 0 --dist no --cov --cov-report xml --cov-append --hypothesis-profile ci $PYTEST_OPT tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ qcodes-dynacool-server = "qcodes.instrument_drivers.QuantumDesign.DynaCoolPPMS.p
log_exported_ds = "qcodes.extensions:log_dataset_export_info"

[tool.coverage.run]
source_pkgs = ["qcodes"]
omit = [
"src/qcodes/__init__.py",
"*/__init__.py",
Expand Down Expand Up @@ -210,7 +211,7 @@ typeCheckingMode = "standard"
minversion = "7.2"
junit_family = "legacy"
testpaths = "tests"
addopts = "-n auto --dist=loadfile"
addopts = "-n auto --dist=loadfile --cov-config=pyproject.toml"
asyncio_default_fixture_loop_scope = "function"
markers = "serial"

Expand Down

0 comments on commit 479f2d6

Please sign in to comment.