Skip to content

Commit 65f5ee3

Browse files
committed
Fix tests.yml doctest run and coverage reporting
Signed-off-by: paul.profizi <[email protected]>
1 parent e8538dc commit 65f5ee3

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/tests.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,29 @@ jobs:
203203
shell: bash
204204
run: pip list
205205

206-
- name: "Test Docstrings"
207-
if: (inputs.DOCSTRING == 'true') && !((inputs.test_any == 'true') && (matrix.os == 'ubuntu-latest'))
208-
uses: ansys/pydpf-actions/[email protected]
206+
- name: "Test API Docstrings"
207+
shell: bash
208+
working-directory: src
209+
run: |
210+
echo "TMP: "$TMP
211+
echo "TEMP: "$TEMP
212+
pytest --doctest-modules $DEBUG --junitxml=junit/test-doctests-results.xml ansys/dpf/core
213+
214+
- name: "Kill all servers"
215+
uses: ansys/pydpf-actions/[email protected]
216+
217+
- name: "Upload Docstring Test Results to artifacts"
218+
uses: actions/upload-artifact@v4
209219
with:
210-
MODULE: ${{env.MODULE}}
211-
PACKAGE_NAME: ${{env.PACKAGE_NAME}}
212-
working-directory: src
220+
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_doctest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
221+
path: src/junit/test-doctests-results.xml
222+
223+
- name: "Upload Docstring coverage to Codecov"
224+
uses: codecov/codecov-action@v4
225+
with:
226+
token: ${{ secrets.CODECOV_TOKEN }} # required
227+
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_doctest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}.xml
228+
flags: doctest,${{ inputs.ANSYS_VERSION }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
213229

214230
- name: "Separate long Core tests"
215231
shell: pwsh

0 commit comments

Comments
 (0)