alunduil / alunduil/woodland-generators

bench, ci, and pre-commit collapse into one workflow per trigger

未關閉
#477 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
enhancement
主要語言
TypeScript
星號
0
分支
0
平均合併
5 小時 35 分鐘
30 天內合併 PR
105

描述

## Summary

Merge `bench.yml`, `ci.yml`, and `pre-commit.yml` into a single workflow, since
all three fire on the same trigger.

## Motivation

#384 records the convention — "split workflows only on differing **triggers**",
codified globally in alunduil/alunduil-chezmoi#413 — but its Scope is naming
only. It renames jobs and never schedules the file consolidation its own
convention implies, so the split remains.

All three carry the identical trigger:

```yaml
on:
push:
branches: [main]
pull_request:
branches: [main]
```

Only `pr-title.yml` (adds `types:`) and `weekly.yml` (schedule) differ.
`alunduil-chezmoi/.github/workflows/ci.yml` is the exemplar: seven jobs under
one push/pull_request trigger, each named for its outcome.

Three `on:` blocks instead of one is not merely cosmetic. When the default
branch moved to `main`, all three kept filtering on `master` and the pre-commit
gate went silently offline for three weeks; a broken hook rev and a Node-20
incompatibility both merged in that window (#474). One trigger block is one
place to get wrong.

## Scope

- Merge the three into `ci.yml`, one job per outcome, job names unique
repo-wide.
- Replace `bench.yml`'s workflow-level `paths:` filter. There is no per-job
equivalent, so it needs a changed-files job feeding an `if:` on the bench job.
This is the substantive part — the filter is why bench was split out in #175.
- Preserve per-job `permissions:` and the `concurrency` groups; both are
job-scopable and do not force a split.
- Re-point any required status checks at the new job names.

## Acceptance criteria

- [ ] One workflow covers the push/pull_request trigger; `pr-title.yml` and
`weekly.yml` stay separate on their own triggers
- [ ] Bench still skips on pull requests that touch no perf-relevant path, and
still runs unfiltered on push
- [ ] Job names are unique repo-wide and legible standalone in the checks list
- [ ] `actionlint` and the rest of pre-commit pass

## Additional context

Sibling to #384, which covers the naming half of the same convention; this is
the consolidation half. Filed separately rather than widening #384.

`paths:` filter rationale: #175. Trigger fix that exposed the cost of the split:
#474.

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。