Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

ci: avoid red gates on superseded runs

Louis Beaumont195d73ce9daf
diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index 570c255e1..d9c4743a1 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -973,7 +973,9 @@ jobs:
linux-wayland-e2e-gate:
name: Linux Wayland E2E Tests
needs: [changes, linux-wayland-e2e-test]
- if: always()
+ # A superseding main push cancels the old workflow. Keep that required
+ # check skipped instead of manufacturing a failure from "cancelled".
+ if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify routed check
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
index f1cdfa79a..160d551ce 100644
--- a/.github/workflows/style.yml
+++ b/.github/workflows/style.yml
@@ -222,7 +222,9 @@ jobs:
lint-gate:
name: Clippy & Format
needs: [changes, lint]
- if: always()
+ # Preserve a failed required check for real lint failures, but do not turn
+ # workflow cancellation from a superseding push into a new red failure.
+ if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify routed check
@@ -237,7 +239,7 @@ jobs:
optimize-gate:
name: Dependency & Performance Checks
needs: [changes, optimize]
- if: always()
+ if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify routed check
@@ -252,7 +254,7 @@ jobs:
lockfiles-gate:
name: Cargo.lock freshness
needs: [changes, lockfiles]
- if: always()
+ if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify routed check
@@ -267,7 +269,7 @@ jobs:
knip-gate:
name: Knip (frontend dead code)
needs: [changes, knip]
- if: always()
+ if: ${{ always() && !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify routed check