Skip to content

Commit b2462d5

Browse files
authored
Run operator tests only after other jobs pass (#2579)
Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 6b5372a commit b2462d5

File tree

2 files changed

+20
-13
lines changed

2 files changed

+20
-13
lines changed

.github/workflows/run-on-main.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,26 @@ jobs:
2323
name: Tests
2424
uses: ./.github/workflows/test.yml
2525
secrets: inherit
26-
e2e-tests:
27-
name: E2E Tests
28-
uses: ./.github/workflows/e2e-tests.yml
2926
codegen:
3027
name: Codegen
3128
uses: ./.github/workflows/verify-gen.yml
29+
# Tier 2: Expensive integration tests - only run after all fast checks pass
30+
e2e-tests:
31+
name: E2E Tests
32+
needs: [linting, tests, codegen]
33+
uses: ./.github/workflows/e2e-tests.yml
34+
operator-ci:
35+
name: Operator CI
36+
needs: [linting, tests, codegen]
37+
permissions:
38+
contents: read
39+
uses: ./.github/workflows/operator-ci.yml
40+
# Tier 3: Build and publish images - only after all tests pass
3241
image-build-and-push:
3342
name: Build and Sign Image
34-
needs: [ linting, security-scan, tests, e2e-tests, codegen ]
43+
needs: [linting, security-scan, tests, e2e-tests, codegen, operator-ci]
3544
permissions:
3645
contents: write
3746
packages: write
3847
id-token: write
39-
uses: ./.github/workflows/image-build-and-publish.yml
40-
operator-ci:
41-
name: Operator CI
42-
permissions:
43-
contents: read
44-
uses: ./.github/workflows/operator-ci.yml
48+
uses: ./.github/workflows/image-build-and-publish.yml

.github/workflows/run-on-pr.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,20 @@ jobs:
2727
name: Tests
2828
uses: ./.github/workflows/test.yml
2929
secrets: inherit
30-
e2e-tests:
31-
name: E2E Tests
32-
uses: ./.github/workflows/e2e-tests.yml
3330
docs:
3431
name: Docs
3532
uses: ./.github/workflows/verify-docgen.yml
3633
codegen:
3734
name: Codegen
3835
uses: ./.github/workflows/verify-gen.yml
36+
# Tier 2: Expensive integration tests - only run after all fast checks pass
37+
e2e-tests:
38+
name: E2E Tests
39+
needs: [linting, tests, docs, codegen]
40+
uses: ./.github/workflows/e2e-tests.yml
3941
operator-ci:
4042
name: Operator CI
43+
needs: [linting, tests, docs, codegen]
4144
permissions:
4245
contents: read
4346
uses: ./.github/workflows/operator-ci.yml

0 commit comments

Comments
 (0)