Skip to content

Commit f0f1da1

Browse files
aleguy02webknjaz
andauthored
Apply suggestions from code review
pass entire CLI flag in workflow Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
1 parent c150df9 commit f0f1da1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ jobs:
277277
if: "! matrix.use_coverage"
278278
shell: bash
279279
env:
280-
JUNIT_XML_PATH: junit-${{ matrix.name }}.xml
280+
_PYTEST_TOX_POSARGS_JUNIT: --junitxml=junit-${{ matrix.name }}.xml
281281
run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz`
282282

283283
- name: Test with coverage
284284
if: "matrix.use_coverage"
285285
shell: bash
286286
env:
287-
JUNIT_XML_PATH: junit-${{ matrix.name }}.xml
287+
_PYTEST_TOX_POSARGS_JUNIT: --junitxml=junit-${{ matrix.name }}.xml
288288
run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`
289289

290290
- name: Generate coverage report

tox.ini

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ description =
4242
under `{basepython}`
4343
doctesting: including doctests
4444
commands =
45-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} --junitxml={env:JUNIT_XML_PATH}
46-
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest --junitxml={env:JUNIT_XML_PATH}
45+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
46+
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules {env:_PYTEST_TOX_POSARGS_JUNIT:} --pyargs _pytest
4747
coverage: coverage combine
4848
coverage: coverage report -m
4949
passenv =
@@ -52,9 +52,8 @@ passenv =
5252
TERM
5353
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
5454
CI
55-
JUNIT_XML_PATH
5655
setenv =
57-
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:}
56+
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_JUNIT:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:}
5857

5958
# See https://docs.python.org/3/library/io.html#io-encoding-warning
6059
# If we don't enable this, neither can any of our downstream users!

0 commit comments

Comments
 (0)