Skip to content

Commit 4a60314

Browse files
Chore: Update python-test-action (#933)
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
1 parent bdc37a6 commit 4a60314

File tree

3 files changed

+59
-5
lines changed

3 files changed

+59
-5
lines changed

.github/workflows/build-test-release.yaml

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
runs-on: 'ubuntu-24.04'
2929
permissions:
3030
contents: read
31+
timeout-minutes: 1
3132
outputs:
3233
tag: "${{ steps.tag-validate.outputs.tag }}"
3334
steps:
@@ -52,6 +53,7 @@ jobs:
5253
dynamic_version: ${{ steps.dynamic-version.outputs.dynamic_version }}
5354
permissions:
5455
contents: read
56+
timeout-minutes: 1
5557
steps:
5658
# Harden the runner used by this workflow
5759
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -81,6 +83,7 @@ jobs:
8183
contents: write
8284
id-token: write # Needed for attestations
8385
attestations: write # Needed for attestations
86+
timeout-minutes: 12
8487
env:
8588
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
8689
steps:
@@ -117,6 +120,7 @@ jobs:
117120
matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}"
118121
permissions:
119122
contents: read
123+
timeout-minutes: 12
120124
steps:
121125
# Harden the runner used by this workflow
122126
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -127,7 +131,9 @@ jobs:
127131

128132
- name: 'Test Python project [PYTEST]'
129133
# yamllint disable-line rule:line-length
130-
uses: lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
134+
uses: modeseven-lfreleng-actions/python-test-action@update-action # Testing
135+
# yamllint disable-line rule:line-length
136+
# uses: lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
131137
with:
132138
python_version: "${{ matrix.python-version }}"
133139

@@ -142,6 +148,7 @@ jobs:
142148
matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}"
143149
permissions:
144150
contents: read
151+
timeout-minutes: 10
145152
steps:
146153
# Harden the runner used by this workflow
147154
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -169,6 +176,7 @@ jobs:
169176
matrix: "${{ fromJson(needs.python-build.outputs.matrix_json) }}"
170177
permissions:
171178
contents: read
179+
timeout-minutes: 10
172180
steps:
173181
# Harden the runner used by this workflow
174182
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -196,6 +204,7 @@ jobs:
196204
permissions:
197205
contents: read
198206
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
207+
timeout-minutes: 5
199208
steps:
200209
# Harden the runner used by this workflow
201210
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -222,6 +231,7 @@ jobs:
222231
permissions:
223232
contents: read
224233
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
234+
timeout-minutes: 5
225235
steps:
226236
# Harden the runner used by this workflow
227237
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -241,14 +251,17 @@ jobs:
241251
promote-release:
242252
name: 'Promote Draft Release'
243253
# yamllint disable-line rule:line-length
244-
if: startsWith(github.ref, 'refs/tags/') || contains(github.event.head_commit.message, '[release]')
254+
if: startsWith(github.ref, 'refs/tags/')
245255
needs:
246256
- tag-validate
247257
- pypi
248258
runs-on: 'ubuntu-24.04'
249259
permissions:
250260
contents: write
251261
# id-token: write
262+
timeout-minutes: 2
263+
outputs:
264+
release_url: "${{ steps.promote-release.outputs.release_url }}"
252265
steps:
253266
# Harden the runner used by this workflow
254267
# yamllint disable-line rule:line-length
@@ -260,9 +273,43 @@ jobs:
260273
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
261274

262275
- name: 'Promote draft release'
276+
id: promote-release
277+
# yamllint disable-line rule:line-length
278+
uses: modeseven-lfreleng-actions/draft-release-promote-action@output-release-url # Testing
263279
# yamllint disable-line rule:line-length
264-
uses: lfreleng-actions/draft-release-promote-action@0392844e1e08a0539b63ba1940a7a2bfa2bda077 # v0.1.1
280+
# uses: lfreleng-actions/draft-release-promote-action@0392844e1e08a0539b63ba1940a7a2bfa2bda077 # v0.1.1
265281
with:
266282
token: "${{ secrets.GITHUB_TOKEN }}"
267283
tag: "${{ needs.tag-validate.outputs.tag }}"
268284
latest: true
285+
286+
# Need to attach build artefacts to the release
287+
# This step could potentially be moved
288+
# (May be better to when/where the release is still in draft state)
289+
attach-artefacts:
290+
name: 'Attach Artefacts to Release'
291+
runs-on: 'ubuntu-24.04'
292+
needs:
293+
- tag-validate
294+
- python-build
295+
- promote-release
296+
permissions:
297+
contents: write
298+
timeout-minutes: 5
299+
steps:
300+
# Harden the runner used by this workflow
301+
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
302+
with:
303+
egress-policy: audit
304+
305+
# Note: should not need a checkout step
306+
307+
- name: 'Attach artefacts to release'
308+
# yamllint disable-line rule:line-length
309+
uses: modeseven-lfreleng-actions/release-attach-artefacts-action@initial-update # Testing
310+
with:
311+
# Probably only need one of these in the implementation; decide later
312+
tag: "${{ needs.tag-validate.outputs.tag }}"
313+
release_url: "${{ needs.promote-release.outputs.release_url }}"
314+
artefact_name: "${{ needs.python-build.outputs.artefact_name }}"
315+
artefact_path: "${{ needs.python-build.outputs.artefact_path }}"

.github/workflows/build-test.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
dynamic_version: ${{ steps.dynamic-version.outputs.dynamic_version }}
4343
permissions:
4444
contents: read
45+
timeout-minutes: 1
4546
steps:
4647
# Harden the runner used by this workflow
4748
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -68,6 +69,7 @@ jobs:
6869
artefact_path: ${{ steps.python-build.outputs.artefact_path }}
6970
permissions:
7071
contents: write
72+
timeout-minutes: 12
7173
env:
7274
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7375
steps:
@@ -102,6 +104,7 @@ jobs:
102104
matrix: ${{ fromJson(needs.python-build.outputs.matrix_json) }}
103105
permissions:
104106
contents: read
107+
timeout-minutes: 12
105108
steps:
106109
# Harden the runner used by this workflow
107110
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -112,7 +115,9 @@ jobs:
112115

113116
- name: "Python tests [pytest] ${{ matrix.python-version }}"
114117
# yamllint disable-line rule:line-length
115-
uses: lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
118+
uses: modeseven-lfreleng-actions/python-test-action@update-action # Testing
119+
# yamllint disable-line rule:line-length
120+
# uses: lfreleng-actions/python-test-action@b06828bf94ae4beef00d49cddc06839eca2d8f05 # v0.1.6
116121
with:
117122
python_version: ${{ matrix.python-version }}
118123

@@ -127,6 +132,7 @@ jobs:
127132
matrix: ${{ fromJson(needs.python-build.outputs.matrix_json) }}
128133
permissions:
129134
contents: read
135+
timeout-minutes: 10
130136
steps:
131137
# Harden the runner used by this workflow
132138
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
@@ -154,6 +160,7 @@ jobs:
154160
matrix: ${{ fromJson(needs.python-build.outputs.matrix_json) }}
155161
permissions:
156162
contents: read
163+
timeout-minutes: 10
157164
steps:
158165
# Harden the runner used by this workflow
159166
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[project]
55
name = "osc-github-devops"
6-
version = "0.1.32"
6+
version = "0.1.33"
77
# Uncomment to enable dynamic versioning
88
# dynamic = [ "version" ]
99
description = "Template Python project"

0 commit comments

Comments
 (0)