Skip to content

Fix tests.yml doctest run and coverage reporting #1805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,29 @@ jobs:
with:
DEBUG: true

- name: "Test Docstrings"
if: (inputs.DOCSTRING == 'true') && !((inputs.test_any == 'true') && (matrix.os == 'ubuntu-latest'))
uses: ansys/pydpf-actions/[email protected]
- name: "List installed packages"
shell: bash
run: pip list

- name: "Test API Docstrings"
shell: bash
working-directory: src
if: (inputs.DOCSTRING == 'true')
run: |
echo "TMP: "$TMP
echo "TEMP: "$TEMP
pytest --doctest-modules $DEBUG --junitxml=junit/test-doctests-results.xml ansys/dpf/core

- name: "Kill all servers"
uses: ansys/pydpf-actions/[email protected]
if: (inputs.DOCSTRING == 'true')

- name: "Upload Docstring Test Results to artifacts"
uses: actions/upload-artifact@v4
if: (inputs.DOCSTRING == 'true')
with:
MODULE: ${{env.MODULE}}
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
working-directory: src
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_doctest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
path: src/junit/test-doctests-results.xml

- name: "Set tox extra CLI arguments"
id: tox-cli-arguments
Expand Down
Loading