Skip to content

Commit 119827c

Browse files
committed
Make tests optional in reusable-ubuntu
1 parent 4205865 commit 119827c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/reusable-ubuntu.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
description: OS to run the job
2323
required: true
2424
type: string
25+
test:
26+
description: Whether to run the Python test suite
27+
required: false
28+
type: boolean
29+
default: true
2530
test-opts:
2631
description: Extra options to pass to the test runner via TESTOPTS
2732
required: false
@@ -36,7 +41,7 @@ env:
3641

3742
jobs:
3843
build-ubuntu-reusable:
39-
name: build and test (${{ inputs.os }})
44+
name: build ${{ fromJSON(inputs.test) && 'and test ' || '' }}(${{ inputs.os }})
4045
runs-on: ${{ inputs.os }}
4146
timeout-minutes: 60
4247
env:
@@ -120,6 +125,7 @@ jobs:
120125
# some tests write to srcdir, lack of pyc files slows down testing
121126
run: sudo mount "$CPYTHON_RO_SRCDIR" -oremount,rw
122127
- name: Tests
128+
if: ${{ inputs.test }}
123129
working-directory: ${{ env.CPYTHON_BUILDDIR }}
124130
run: xvfb-run make ci EXTRATESTOPTS="${TEST_OPTS}"
125131
env:

0 commit comments

Comments
 (0)