chore(ci): drop redundant push trigger; add concurrency group
All checks were successful
PR Check / rust (pull_request) Successful in 22m29s
PR Check / frontend (pull_request) Successful in 2m26s

The `push` + `pull_request` combo doubled CI runs on every PR (visible
on #170 with 4 pending checks instead of 2). Drop `push`, keep
`pull_request: branches: [main]`.

Trade-off: branches pushed without an open PR no longer get CI
feedback. Open a draft PR if you want CI to run before requesting
review — `/fix-issue` always opens a PR right after pushing, so the
gap is essentially zero in practice.

Also adds a concurrency group `ci-${{ github.ref }}` with
cancel-in-progress so force-pushes cancel the previous run instead
of stacking.

Same change applied to .github/workflows/check.yml (GitHub mirror)
to keep the two configs in sync.

Fixes #171
This commit is contained in:
le king fu 2026-04-28 20:50:34 -04:00
parent 3342fd9bb7
commit af36b51cf7
2 changed files with 19 additions and 7 deletions

View file

@ -1,17 +1,24 @@
name: PR Check name: PR Check
# Validates Rust + frontend on every branch push and PR. # Validates Rust + frontend on every PR opened against main.
# Goal: catch compile errors, type errors, and failing tests BEFORE merge, # Goal: catch compile errors, type errors, and failing tests BEFORE merge,
# instead of waiting for the release tag (which is when release.yml runs). # instead of waiting for the release tag (which is when release.yml runs).
#
# Trigger is `pull_request` only — the previous `push` trigger duplicated
# every run when a branch was pushed and immediately opened as a PR (#171).
# Trade-off: branches pushed without an open PR don't get CI feedback. Open
# a draft PR if you want feedback before requesting review.
on: on:
push:
branches-ignore:
- main
pull_request: pull_request:
branches: branches:
- main - main
# Cancel obsolete runs (e.g. on force-push) so only the latest commit runs.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
rust: rust:
runs-on: ubuntu runs-on: ubuntu

View file

@ -2,15 +2,20 @@ name: PR Check
# Mirror of .forgejo/workflows/check.yml using GitHub-native runners. # Mirror of .forgejo/workflows/check.yml using GitHub-native runners.
# Forgejo is the primary host; this file keeps the GitHub mirror functional. # Forgejo is the primary host; this file keeps the GitHub mirror functional.
#
# Trigger is `pull_request` only — kept in sync with the Forgejo workflow
# after #171 dropped the redundant `push` trigger that duplicated every run.
on: on:
push:
branches-ignore:
- main
pull_request: pull_request:
branches: branches:
- main - main
# Cancel obsolete runs (e.g. on force-push) so only the latest commit runs.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
rust: rust:
runs-on: ubuntu-latest runs-on: ubuntu-latest