Skip to content

Commit 5881882

Browse files
Use different approach to saving JUnit results
1 parent 9618484 commit 5881882

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/workflows/code.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,18 @@ jobs:
3838
python: [cp36, cp37, cp38, cp39]
3939

4040
include:
41-
# Put coverage in the project directory for mac
41+
# Put coverage and results files in the project directory for mac
4242
- os: macos-latest
4343
cov_file: "{project}/dist/coverage.xml"
44+
results_file: "{project}/dist/pytest-results.xml"
4445
# And for windows
4546
- os: windows-latest
4647
cov_file: "{project}/dist/coverage.xml"
47-
# But put coverage in the output dir mounted in docker for linux
48+
results_file: "{project}/dist/pytest-results.xml"
49+
# But put coverage and results files in the output dir mounted in docker for linux
4850
- os: ubuntu-latest
4951
cov_file: /output/coverage.xml
52+
results_file: /output/pytest-results.xml
5053
# Build an sdist on linux so it has the right line endings
5154
- os: ubuntu-latest
5255
sdist: true
@@ -80,7 +83,7 @@ jobs:
8083
env:
8184
CIBW_BUILD: ${{ matrix.python }}*64
8285
CIBW_TEST_EXTRAS: dev
83-
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }}
86+
CIBW_TEST_COMMAND: pytest {project}/tests --cov-report xml:${{ matrix.cov_file }} --junit-xml=${{matrix.results_file}}
8487
# Disable auditwheel as it isn't compatible with setuptools_dso approach
8588
# https://github.com/mdavidsaver/setuptools_dso/issues/17
8689
CIBW_REPAIR_WHEEL_COMMAND: ""
@@ -105,7 +108,8 @@ jobs:
105108
uses: actions/upload-artifact@v2
106109
with:
107110
name: Unit Test Results (${{ matrix.os }}/${{ matrix.python }})
108-
path: pytest-results.xml
111+
path: ${{matrix.results_file}}
112+
directory: dist
109113

110114
publish-test-results:
111115
name: "Publish Unit Tests Results"

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ coverage.xml
4545
*.mypy_cache
4646
*.pytest_cache
4747
cov.xml
48-
pytest-results.xml
4948

5049
# DLS build dir and virtual environment
5150
/prefix/

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ extend-ignore =
5959
# Don't do flake8 here as we need to separate it out for CI
6060
addopts =
6161
--tb=native -vv --doctest-modules --ignore=iocStats --ignore=epicscorelibs --ignore=docs
62-
--cov=softioc --cov-report term --cov-report xml:cov.xml --junit-xml=pytest-results.xml
62+
--cov=softioc --cov-report term --cov-report xml:cov.xml
6363

6464
[coverage:run]
6565
# This is covered in the versiongit test suite so exclude it here

0 commit comments

Comments
 (0)