Skip to content

Commit 0830a5b

Browse files
committed
ci: allow overriding live example test failures on manual release
1 parent afe1c6f commit 0830a5b

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ name: Release
33
on:
44
push:
55
tags: ['v**']
6+
workflow_dispatch:
7+
inputs:
8+
allow_example_test_failures:
9+
description: 'Publish even if the live example tests fail (use only when a SerpApi engine is down)'
10+
type: boolean
11+
default: false
612

713
concurrency:
814
group: ${{ github.workflow }}-${{ github.ref }}
@@ -18,6 +24,12 @@ jobs:
1824
steps:
1925
- uses: actions/checkout@v6
2026

27+
- name: Ensure ref is a tag
28+
if: github.ref_type != 'tag'
29+
run: |
30+
echo "Release must run against a tag, got '${{ github.ref }}'" >&2
31+
exit 1
32+
2133
- uses: actions/setup-python@v6
2234
with:
2335
python-version: ${{ matrix.python-version }}
@@ -32,6 +44,7 @@ jobs:
3244

3345
- name: Run example tests
3446
if: matrix.python-version == '3.14'
47+
continue-on-error: ${{ inputs.allow_example_test_failures == true }}
3548
run: pytest -k "example"
3649
env:
3750
API_KEY: ${{ secrets.API_KEY }}

0 commit comments

Comments
 (0)