Skip to content

Commit 4743fcb

Browse files
authored
Allow multiple test directories (#154)
* Allow multiple test directories In the unit-test action, and propagate the docstring change up through the tools that depend on this. This gives finer-grained control for which tests to run where (in particular, to exclude the benchmark tests from the coverage run, if you want) Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com> * Convert the input var to a bash iterable Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com> * Target branch Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com> --------- Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
1 parent 9cce1b6 commit 4743fcb

12 files changed

Lines changed: 41 additions & 38 deletions

File tree

.github/workflows/dependabot-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
2626
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
2727
token: ${{ secrets.DEPENDABOT_WORKFLOW_TOKEN }}
28-
- uses: pyiron/actions/update-env-files@actions-4.0.6
28+
- uses: pyiron/actions/update-env-files@actions-4.0.7
2929
- name: UpdateDependabotPR commit
3030
run: |
3131
git config --local user.email "pyiron@mpie.de"

.github/workflows/hatch-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ jobs:
8686
runs-on: ${{ inputs.runner }}
8787
steps:
8888
- uses: actions/checkout@v4
89-
- uses: pyiron/actions/cached-miniforge@actions-4.0.6
89+
- uses: pyiron/actions/cached-miniforge@actions-4.0.7
9090
with:
9191
python-version: ${{ inputs.python-version }}
9292
env-files: ${{ inputs.env-files }}
93-
- uses: pyiron/actions/update-pyproject-dependencies@actions-4.0.6
93+
- uses: pyiron/actions/update-pyproject-dependencies@actions-4.0.7
9494
with:
9595
input-toml: ${{ inputs.input-toml }}
9696
lower-bound-yaml: ${{ inputs.lower-bound-yaml }}

.github/workflows/pr-labeled.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848

4949
tests-and-coverage:
5050
if: contains(github.event.pull_request.labels.*.name, 'run_coverage')
51-
uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.6
51+
uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.7
5252
secrets: inherit
5353

5454
code-ql:
5555
if: contains(github.event.pull_request.labels.*.name, 'run_CodeQL')
56-
uses: pyiron/actions/.github/workflows/codeql.yml@actions-4.0.6
56+
uses: pyiron/actions/.github/workflows/codeql.yml@actions-4.0.7
5757
secrets: inherit

.github/workflows/push-pull.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,17 +158,17 @@ on:
158158
required: false
159159
unit-test-dir:
160160
type: string
161-
description: 'The directory containing the unit tests run on the full platform and python matrix'
161+
description: 'The directory (or space-separated directories) containing the unit tests run on the full platform and python matrix'
162162
default: tests/unit
163163
required: false
164164
coverage-test-dir:
165165
type: string
166-
description: 'The directory containing the tests analyzed for coverage'
166+
description: 'The directory (or space-separated directories) containing the tests analyzed for coverage'
167167
default: tests
168168
required: false
169169
benchmark-test-dir:
170170
type: string
171-
description: 'The directory containing the benchmark tests'
171+
description: 'The directory (or space-separated directories) containing the benchmark tests'
172172
default: tests/benchmark
173173
required: false
174174
omit-patterns:
@@ -207,11 +207,11 @@ jobs:
207207
ref: ${{ github.event.pull_request.head.ref }} # Check out the head of the actual branch, not the PR
208208
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
209209
if: ${{ inputs.do-commit-updated-env }}
210-
- uses: pyiron/actions/write-docs-env@actions-4.0.6
210+
- uses: pyiron/actions/write-docs-env@actions-4.0.7
211211
with:
212212
env-files: ${{ inputs.docs-env-files }}
213213
if: ${{ inputs.do-commit-updated-env }}
214-
- uses: pyiron/actions/write-environment@actions-4.0.6
214+
- uses: pyiron/actions/write-environment@actions-4.0.7
215215
with:
216216
env-files: ${{ inputs.notebooks-env-files }}
217217
output-env-file: .binder/environment.yml
@@ -238,11 +238,11 @@ jobs:
238238
runs-on: ${{ inputs.runner }}
239239
steps:
240240
- uses: actions/checkout@v4
241-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
241+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
242242
if: inputs.extra-python-paths != ''
243243
with:
244244
path-dirs: ${{ inputs.extra-python-paths }}
245-
- uses: pyiron/actions/build-docs@actions-4.0.6
245+
- uses: pyiron/actions/build-docs@actions-4.0.7
246246
with:
247247
python-version: ${{ inputs.python-version }}
248248
env-files: ${{ inputs.docs-env-files }}
@@ -253,11 +253,11 @@ jobs:
253253
runs-on: ${{ inputs.runner }}
254254
steps:
255255
- uses: actions/checkout@v4
256-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
256+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
257257
if: inputs.extra-python-paths != ''
258258
with:
259259
path-dirs: ${{ inputs.extra-python-paths }}
260-
- uses: pyiron/actions/build-notebooks@actions-4.0.6
260+
- uses: pyiron/actions/build-notebooks@actions-4.0.7
261261
with:
262262
python-version: ${{ inputs.python-version }}
263263
env-files: ${{ inputs.notebooks-env-files }}
@@ -294,11 +294,11 @@ jobs:
294294

295295
steps:
296296
- uses: actions/checkout@v4
297-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
297+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
298298
if: inputs.extra-python-paths != ''
299299
with:
300300
path-dirs: ${{ inputs.extra-python-paths }}
301-
- uses: pyiron/actions/unit-tests@actions-4.0.6
301+
- uses: pyiron/actions/unit-tests@actions-4.0.7
302302
with:
303303
python-version: ${{ matrix.python-version }}
304304
env-files: ${{ inputs.tests-env-files }}
@@ -311,7 +311,7 @@ jobs:
311311
coverage:
312312
needs: commit-updated-env
313313
if: ${{ inputs.do-codecov || inputs.do-coveralls || inputs.do-codacy }}
314-
uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.6
314+
uses: pyiron/actions/.github/workflows/tests-and-coverage.yml@actions-4.0.7
315315
secrets: inherit
316316
with:
317317
tests-env-files: ${{ inputs.tests-env-files }}
@@ -331,11 +331,11 @@ jobs:
331331
runs-on: ${{ inputs.runner }}
332332
steps:
333333
- uses: actions/checkout@v4
334-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
334+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
335335
if: inputs.extra-python-paths != ''
336336
with:
337337
path-dirs: ${{ inputs.extra-python-paths }}
338-
- uses: pyiron/actions/unit-tests@actions-4.0.6
338+
- uses: pyiron/actions/unit-tests@actions-4.0.7
339339
with:
340340
python-version: ${{ inputs.python-version }}
341341
env-files: ${{ inputs.tests-env-files }}
@@ -350,11 +350,11 @@ jobs:
350350
runs-on: ${{ inputs.runner }}
351351
steps:
352352
- uses: actions/checkout@v4
353-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
353+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
354354
if: inputs.extra-python-paths != ''
355355
with:
356356
path-dirs: ${{ inputs.extra-python-paths }}
357-
- uses: pyiron/actions/unit-tests@actions-4.0.6
357+
- uses: pyiron/actions/unit-tests@actions-4.0.7
358358
with:
359359
python-version: ${{ inputs.alternate-tests-python-version }}
360360
env-files: ${{ inputs.alternate-tests-env-files }}
@@ -370,7 +370,7 @@ jobs:
370370
runs-on: ${{ inputs.runner }}
371371
steps:
372372
- uses: actions/checkout@v4
373-
- uses: pyiron/actions/pip-check@actions-4.0.6
373+
- uses: pyiron/actions/pip-check@actions-4.0.7
374374
with:
375375
python-version: ${{ inputs.python-version }}
376376

.github/workflows/pyproject-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ jobs:
8383
runs-on: ${{ inputs.runner }}
8484
steps:
8585
- uses: actions/checkout@v4
86-
- uses: pyiron/actions/cached-miniforge@actions-4.0.6
86+
- uses: pyiron/actions/cached-miniforge@actions-4.0.7
8787
with:
8888
python-version: ${{ inputs.python-version }}
8989
env-files: ${{ inputs.env-files }}
90-
- uses: pyiron/actions/update-pyproject-dependencies@actions-4.0.6
90+
- uses: pyiron/actions/update-pyproject-dependencies@actions-4.0.7
9191
with:
9292
input-toml: ${{ inputs.input-toml }}
9393
lower-bound-yaml: ${{ inputs.lower-bound-yaml }}

.github/workflows/tests-and-coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
inputs:
1616
test-dir:
1717
type: string
18-
description: 'The directory containing the tests'
18+
description: 'The directory (or space-separated directories) containing the tests'
1919
default: tests
2020
required: false
2121
omit-patterns:
@@ -69,11 +69,11 @@ jobs:
6969
runs-on: ${{ inputs.runner }}
7070
steps:
7171
- uses: actions/checkout@v4
72-
- uses: pyiron/actions/add-to-python-path@actions-4.0.6
72+
- uses: pyiron/actions/add-to-python-path@actions-4.0.7
7373
if: inputs.extra-python-paths != ''
7474
with:
7575
path-dirs: ${{ inputs.extra-python-paths }}
76-
- uses: pyiron/actions/unit-tests@actions-4.0.6
76+
- uses: pyiron/actions/unit-tests@actions-4.0.7
7777
with:
7878
python-version: ${{ inputs.python-version }}
7979
env-files: ${{ inputs.tests-env-files }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ on:
119119

120120
jobs:
121121
pyiron:
122-
uses: pyiron/actions/.github/workflows/push-pull.yml@actions-4.0.6
122+
uses: pyiron/actions/.github/workflows/push-pull.yml@actions-4.0.7
123123
secrets: inherit
124124
```
125125

build-docs/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ inputs:
2121
runs:
2222
using: 'composite'
2323
steps:
24-
- uses: pyiron/actions/cached-miniforge@actions-4.0.6
24+
- uses: pyiron/actions/cached-miniforge@actions-4.0.7
2525
with:
2626
python-version: ${{ inputs.python-version }}
2727
env-files: ${{ inputs.standard-docs-env-file }} ${{ inputs.env-files }}
28-
- uses: pyiron/actions/pyiron-config@actions-4.0.6
28+
- uses: pyiron/actions/pyiron-config@actions-4.0.7
2929
- name: Build sphinx documentation
3030
shell: bash -l {0}
3131
run: |

build-notebooks/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ inputs:
2828
runs:
2929
using: 'composite'
3030
steps:
31-
- uses: pyiron/actions/cached-miniforge@actions-4.0.6
31+
- uses: pyiron/actions/cached-miniforge@actions-4.0.7
3232
with:
3333
python-version: ${{ inputs.python-version }}
3434
env-files: ${{ inputs.standard-notebooks-env-file }} ${{ inputs.env-files }}
35-
- uses: pyiron/actions/pyiron-config@actions-4.0.6
35+
- uses: pyiron/actions/pyiron-config@actions-4.0.7
3636
- name: Build notebooks
3737
shell: bash -l {0}
3838
run: $GITHUB_ACTION_PATH/../.support/build_notebooks.sh ${{ inputs.notebooks-dir }} ${{ inputs.exclusion-file }} ${{ inputs.kernel }}

cached-miniforge/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ inputs:
6262
runs:
6363
using: "composite"
6464
steps:
65-
- uses: pyiron/actions/write-environment@actions-4.0.6
65+
- uses: pyiron/actions/write-environment@actions-4.0.7
6666
with:
6767
env-files: ${{ inputs.env-files }}
6868
- name: Calculate cache label info

0 commit comments

Comments
 (0)