Skip to content

Commit 3e8b1fa

Browse files
authored
Flatten the workflow hierarchy for run_unit_tests (#171)
1 parent ca86811 commit 3e8b1fa

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

.github/workflows/test_package.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Test package
2-
32
on:
43
workflow_call:
54
inputs:
@@ -18,21 +17,35 @@ on:
1817

1918
jobs:
2019
get_package_info:
21-
name: Get package info for ${{ inputs.package-name }}
20+
name: Get package info - ${{ inputs.package-name }}
2221
uses: ./.github/workflows/get_package_info.yml
2322
with:
2423
package-name: ${{ inputs.package-name }}
2524
run_unit_tests:
2625
if: ${{ needs.get_package_info.outputs.should-run-tests == 'true' }}
2726
strategy:
27+
# Fail-fast skews the pass/fail ratio and seems to make pytest produce
28+
# incomplete JUnit XML results.
29+
fail-fast: false
2830
matrix:
2931
os: [windows-latest, ubuntu-latest]
3032
python-version: [3.9, '3.10', 3.11, 3.12, 3.13]
31-
name: Run unit tests
33+
name: Run unit tests - ${{ inputs.package-name }} (${{ matrix.python-version }} - ${{ matrix.os }})
3234
needs: get_package_info
33-
uses: ./.github/workflows/run_unit_tests.yml
34-
with:
35-
package-name: ${{ inputs.package-name }}
36-
package-basepath: ${{ needs.get_package_info.outputs.package-basepath }}
37-
python-version: ${{ matrix.python-version }}
38-
os: ${{ matrix.os }}
35+
runs-on: ${{ matrix.os }}
36+
steps:
37+
- name: Check out repo
38+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
39+
with:
40+
submodules: true
41+
- name: Set up Python
42+
uses: ni/python-actions/setup-python@f42e2f27a585f5d47efcab79b608ec0ec97191c9 # v0.6.1
43+
id: setup-python
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
- name: Set up Poetry
47+
uses: ni/python-actions/setup-poetry@f42e2f27a585f5d47efcab79b608ec0ec97191c9 # v0.6.1
48+
- uses: ./.github/actions/run_and_upload_unit_tests
49+
with:
50+
package-name: ${{ inputs.package-name }}
51+
package-basepath: ${{ needs.get_package_info.outputs.package-basepath }}

0 commit comments

Comments
 (0)