From 7614f303c8722414228f608b8366e613e4f6982f Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 7 Jul 2020 09:20:23 +0200 Subject: [PATCH 1/6] github-actions: add codecov upload --- .github/workflows/tox.yml | 5 +++++ setup.cfg | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index ff3e161..3af952c 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -38,6 +38,11 @@ jobs: - name: Check package if: matrix.python-version == 3.9 run: tox -e check_package + - name: Upload to coverage + uses: codecov/codecov-action@v1.2.1 + with: + files: coverage.xml + flags: ${{ matrix.python-version }},${{ matrix.tox-testenv }} - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@master if: >- diff --git a/setup.cfg b/setup.cfg index d2b4c37..8e3f336 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ addopts = -v --junit-xml=test-report.xml --doctest-modules --cov=riotctrl --cov-branch - --cov-report=term --cov-report=xml --cov-report=html + --cov-report=term-missing --cov-report=xml testpaths = riotctrl markers = rapidjson From 41b4df4d915d78d0d2b3e9e7bd3c40d68c31cbd3 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 22 Jan 2021 14:35:21 +0100 Subject: [PATCH 2/6] fixup! github-actions: add codecov upload --- .github/workflows/tox.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 3af952c..9026df0 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -40,9 +40,6 @@ jobs: run: tox -e check_package - name: Upload to coverage uses: codecov/codecov-action@v1.2.1 - with: - files: coverage.xml - flags: ${{ matrix.python-version }},${{ matrix.tox-testenv }} - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@master if: >- From ef0f6d4a75cc20ab735a23d656d09aa37d8d6575 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 24 Sep 2021 10:29:16 +0200 Subject: [PATCH 3/6] setup.cfg: combine coverage results --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 8e3f336..c5ad54b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [tool:pytest] addopts = -v --junit-xml=test-report.xml --doctest-modules - --cov=riotctrl --cov-branch + --cov=riotctrl --cov-branch --cov-append --cov-report=term-missing --cov-report=xml testpaths = riotctrl markers = From b0ddb50bad8904a6582c0f0206c65be821a01cd4 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 24 Sep 2021 10:35:02 +0200 Subject: [PATCH 4/6] setup.cfg / coverage: exclude NotImplementedErrors et al. --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.cfg b/setup.cfg index c5ad54b..7b4bf90 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,6 +7,11 @@ testpaths = riotctrl markers = rapidjson +[coverage:report] +exclude_lines = pragma: no cover + raise NotImplementedError + return NotImplemented + [pylint] reports = no max-line-length = 88 From 89d86af5b43d3c263cfbf061745affc268fa9039 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 24 Sep 2021 10:37:08 +0200 Subject: [PATCH 5/6] squash! setup.cfg: combine coverage results github-actions: run `rapidjson` testenv separately To append coverage results. --- .github/workflows/tox.yml | 3 ++- setup.cfg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 9026df0..5995638 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -31,7 +31,8 @@ jobs: - name: Test with tox run: | pyenv="py$(echo "${{ matrix.python-version }}" | tr -d '.')" - tox -e ${pyenv}-test,${pyenv}-rapidjson,flake8,lint + tox -e ${pyenv}-test,flake8,lint + tox -e ${pyenv}-rapidjson -- --cov-append - name: Check code format with black if: matrix.python-version == 3.9 run: tox -e black diff --git a/setup.cfg b/setup.cfg index 7b4bf90..9634fe9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [tool:pytest] addopts = -v --junit-xml=test-report.xml --doctest-modules - --cov=riotctrl --cov-branch --cov-append + --cov=riotctrl --cov-branch --cov-report=term-missing --cov-report=xml testpaths = riotctrl markers = From f1d392ca11fd1c623c277a29a123855e61d0b6d6 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Tue, 28 Sep 2021 13:18:19 +0200 Subject: [PATCH 6/6] fixup! setup.cfg / coverage: exclude NotImplementedErrors et al. --- setup.cfg | 5 ----- 1 file changed, 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9634fe9..8e3f336 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,11 +7,6 @@ testpaths = riotctrl markers = rapidjson -[coverage:report] -exclude_lines = pragma: no cover - raise NotImplementedError - return NotImplemented - [pylint] reports = no max-line-length = 88