Skip to content

Commit 23891bc

Browse files
[codex] fix ci success on main pushes (#81)
## Summary `test` workflow runs on direct pushes to `main` are failing in the aggregate `CI Success` job even when this repo's `Unit tests (bats)` and `Shellcheck` jobs pass. ## Root cause `CI Success` uses the shared `promptfoo/.github` action that waits for all checks on the commit. That is the right behavior for pull requests, but on `push` events to `main` the same commit can also have unrelated branch-level checks such as `Dependabot` and CodeQL checks. In the failing run for `9b1c42b`, `Dependabot` completed with `failure`, so `CI Success` failed this workflow despite the repo-local jobs passing. ## Fix Keep `CI Success` for `pull_request` events, but skip it on `push` events. The repo-local `unit` and `lint` jobs still run on pushes to `main`, and the workflow result now reflects those jobs instead of unrelated checks. ## Validation - `make test-unit` - `shellcheck --severity=error src/crabcode`
1 parent 9b1c42b commit 23891bc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ jobs:
4444
name: CI Success
4545
runs-on: ubuntu-latest
4646
needs: [unit, lint]
47-
if: always()
47+
# The shared action waits for all PR checks on this commit; on push to main
48+
# it can also pick up unrelated branch checks (for example Dependabot).
49+
if: ${{ always() && github.event_name == 'pull_request' }}
4850
timeout-minutes: 5
4951
permissions:
5052
checks: read

0 commit comments

Comments
 (0)