Skip to content

Commit 6003e7a

Browse files
committed
tests: always trigger gapic specialized tests
1 parent 58912bc commit 6003e7a

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/gapic-generator-tests.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,8 @@ name: Gapic Generator Specialized Tests
22

33
on:
44
pull_request:
5-
paths:
6-
- 'packages/gapic-generator/**'
7-
- '.github/workflows/gapic-generator-tests.yml'
85
push:
96
branches: [main]
10-
paths:
11-
- 'packages/gapic-generator/**'
127

138
concurrency:
149
group: gapic-gen-${{ github.head_ref || github.run_id }}
@@ -27,11 +22,8 @@ env:
2722
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: "1"
2823

2924
jobs:
25+
# Check if the gapic-generator was changed. If so, execute specialized tests
3026
check_changes:
31-
# We use a job-level 'if' with dorny/paths-filter because GitHub's top-level
32-
# 'on: pull_request: paths' can be bypassed during repository-wide migrations
33-
# or structural changes. This ensures these specialized (and heavy) matrix
34-
# jobs stay silent on PRs that do not touch the generator.
3527
runs-on: ubuntu-latest
3628
outputs:
3729
run_generator: ${{ steps.filter.outputs.generator }}
@@ -224,3 +216,16 @@ jobs:
224216
# WORKSPACE file is located there.
225217
cd packages/gapic-generator
226218
bazelisk test //tests/integration/... --test_output=errors
219+
220+
# Final job to simplify branch protection rules.
221+
# This job will be reported as 'Success' if all its dependencies either
222+
# pass or are skipped due to path filtering.
223+
status:
224+
needs: [check_changes, python_config, showcase-unit, showcase-mypy, goldens, goldens-prerelease, fragment-snippet, integration]
225+
if: always()
226+
runs-on: ubuntu-latest
227+
steps:
228+
- name: Check all jobs for failure
229+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
230+
run: exit 1
231+

0 commit comments

Comments
 (0)