From bba3547edcbf1c3fe09f33d41091285e894a6b91 Mon Sep 17 00:00:00 2001 From: Andy Sweet Date: Sun, 21 May 2023 13:33:46 -0700 Subject: [PATCH 1/2] Generate pytest JSON report --- setup.cfg | 1 + tox.ini | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 665774e..1abccb2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,6 +65,7 @@ testing = pytest-qt # https://pytest-qt.readthedocs.io/en/latest/ pyqt5 tox + pytest-json-report [options.package_data] * = *.yaml diff --git a/tox.ini b/tox.ini index 3a39657..7896193 100644 --- a/tox.ini +++ b/tox.ini @@ -29,4 +29,4 @@ passenv = PYVISTA_OFF_SCREEN extras = testing -commands = pytest -v --color=yes --cov=napari_metadata --cov-report=xml +commands = pytest -v --color=yes --cov=napari_metadata --cov-report=xml --json-report --json-report-file={toxinidir}/report-{envname}.json From 187ee4f44066c940a7fc06cd3ae9254c89327fa4 Mon Sep 17 00:00:00 2001 From: Andy Sweet Date: Sun, 21 May 2023 15:18:30 -0700 Subject: [PATCH 2/2] Upload reports --- .github/workflows/test_and_deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 61cb6a6..effd583 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -82,6 +82,11 @@ jobs: - name: Coverage uses: codecov/codecov-action@v2 + - uses: actions/upload-artifact@v3 + with: + name: Upload pytest reports as JSON + path: ./report-*.json + deploy: # this will run when you have tagged a commit, starting with "v*" # and requires that you have put your twine API key in your