Skip to content

Commit 07b61ba

Browse files
committed
ci: enforce lowercase readme and tighten fast checks
1 parent d8302c9 commit 07b61ba

11 files changed

Lines changed: 53 additions & 5 deletions

File tree

.github/workflows/canary.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
- name: Checkout
4545
uses: actions/checkout@v4
4646

47+
- name: Validate readme casing
48+
run: scripts/ci/check-readme-case.sh
49+
4750
- name: Cache vendored deps
4851
uses: actions/cache@v4
4952
with:
@@ -117,6 +120,9 @@ jobs:
117120
- name: Checkout
118121
uses: actions/checkout@v4
119122

123+
- name: Validate readme casing
124+
run: scripts/ci/check-readme-case.sh
125+
120126
- name: Cache vendored deps
121127
uses: actions/cache@v4
122128
with:

.github/workflows/nightly-validation.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
- name: Checkout
3333
uses: actions/checkout@v4
3434

35+
- name: Validate readme casing
36+
run: scripts/ci/check-readme-case.sh
37+
3538
- name: Cache vendored deps
3639
uses: actions/cache@v4
3740
with:
@@ -77,6 +80,9 @@ jobs:
7780
- name: Checkout
7881
uses: actions/checkout@v4
7982

83+
- name: Validate readme casing
84+
run: scripts/ci/check-readme-case.sh
85+
8086
- name: Cache vendored deps
8187
uses: actions/cache@v4
8288
with:

.github/workflows/pr-fast.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v4
2828

29+
- name: Validate readme casing
30+
run: scripts/ci/check-readme-case.sh
31+
2932
- name: Cache vendored deps
3033
uses: actions/cache@v4
3134
with:
@@ -55,3 +58,6 @@ jobs:
5558

5659
- name: Check seq bridge
5760
run: cargo check -p seq_everruns_bridge
61+
62+
- name: Compile seq bridge tests
63+
run: cargo test -p seq_everruns_bridge --no-run

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ jobs:
3636
- name: Checkout
3737
uses: actions/checkout@v4
3838

39+
- name: Validate readme casing
40+
run: scripts/ci/check-readme-case.sh
41+
3942
- name: Cache vendored deps
4043
uses: actions/cache@v4
4144
with:
@@ -109,6 +112,9 @@ jobs:
109112
- name: Checkout
110113
uses: actions/checkout@v4
111114

115+
- name: Validate readme casing
116+
run: scripts/ci/check-readme-case.sh
117+
112118
- name: Cache vendored deps
113119
uses: actions/cache@v4
114120
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ __pycache__/
7979
# explain-commits output is local/generated by default
8080
docs/commits/*
8181
!docs/commits/
82-
!docs/commits/README.md
82+
!docs/commits/readme.md
8383
!docs/commits/.gitkeep

docs/ci-cd-runbook.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ This runbook documents how Flow CI/CD is wired today and how to debug it quickly
1616
- Both workflows run `scripts/vendor/vendor-repo.sh hydrate` immediately after checkout in each build job.
1717
- This materializes `lib/vendor/*` from the pinned commit in `vendor.lock.toml` before Cargo builds.
1818
- Build jobs cache vendor checkout/materialization (`.vendor/flow-vendor`, `lib/vendor`, `lib/vendor-manifest`) keyed by `vendor.lock.toml`.
19+
- Repository policy checks:
20+
- CI enforces lowercase `readme.md` naming via `scripts/ci/check-readme-case.sh`.
1921
- Build jobs in both workflows:
2022
- Matrix build: macOS + Linux targets.
2123
- SIMD build: `build-linux-host-simd` (Linux x64 with `--features linux-host-simd-json`).
@@ -95,7 +97,7 @@ Canary flow:
9597
PR flow:
9698

9799
1. Open/refresh PR to `main`.
98-
2. Watch `PR Fast Check`.
100+
2. Watch `PR Fast Check` (`cargo check` + `cargo test --no-run` shard).
99101
3. Merge only after fast check passes.
100102

101103
## Debug Playbook
File renamed without changes.

scripts/ci/check-readme-case.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
5+
cd "$repo_root"
6+
7+
# Enforce lowercase readme filenames in tracked files.
8+
bad="$(git ls-files | rg '(^|/)README\.md$' || true)"
9+
10+
if [[ -n "$bad" ]]; then
11+
echo "error: uppercase README.md paths are not allowed; use lowercase readme.md"
12+
echo "$bad" | sed 's/^/ - /'
13+
exit 1
14+
fi
15+
16+
echo "ok: no uppercase README.md paths found"

scripts/vendor/vendor-repo.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,14 @@ ensure_repo_layout() {
174174
local checkout="$1"
175175
mkdir -p "$checkout/crates" "$checkout/manifests" "$checkout/profiles"
176176

177-
if [[ ! -f "$checkout/README.md" ]]; then
178-
cat > "$checkout/README.md" <<'README'
177+
# Enforce lowercase readme naming in vendor repo root.
178+
if [[ -f "$checkout/README.md" && ! -f "$checkout/readme.md" ]]; then
179+
mv "$checkout/README.md" "$checkout/readme.md"
180+
fi
181+
rm -f "$checkout/README.md"
182+
183+
if [[ ! -f "$checkout/readme.md" ]]; then
184+
cat > "$checkout/readme.md" <<'README'
179185
# flow-vendor
180186
181187
Canonical vendored dependency source for `nikivdev/flow`.
File renamed without changes.

0 commit comments

Comments
 (0)