Skip to content

Commit d4ec5c1

Browse files
committed
ci
1 parent 3500e22 commit d4ec5c1

2 files changed

Lines changed: 30 additions & 8 deletions

File tree

.github/workflows/ci-lean.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,21 @@ jobs:
4040
# WHY: Needed to access files for checks.
4141
uses: actions/checkout@v6
4242

43-
- name: A2) Run pre-commit (all files)
43+
- name: A2) Install uv
44+
# WHY: The E2) se-validate-manifest pre-commit hook shells out to `uvx`,
45+
# which is NOT preinstalled on the runner.
46+
uses: astral-sh/setup-uv@v8.1.0
47+
with:
48+
enable-cache: true # WHY: Cache uv downloads across runs.
49+
50+
- name: A3) Run pre-commit (all files)
4451
# WHY: Single source of truth for locally runnable quality gates.
4552
# OBS: Fails if hooks would modify files; does not commit changes.
46-
id: precommit # WHY: Identify step for conditional follow-up. # WHY: Identify step for conditional follow-up.
53+
id: precommit # WHY: Identify step for conditional follow-up.
4754
uses: pre-commit/action@v3.0.1
4855
with:
4956
extra_args: --all-files
5057

51-
- name: A2f) If pre-commit failed, run it locally
52-
if: failure()
53-
run: |
54-
echo "## Pre-commit failed" >> "$GITHUB_STEP_SUMMARY"
55-
echo "Please run pre-commit locally and commit the resulting changes." >> "$GITHUB_STEP_SUMMARY"
56-
5758
build:
5859
name: Build Lean (compile)
5960
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,27 @@ repos:
9696
- id: check-case-conflict
9797
name: C3) Check for filename case conflicts
9898

99+
# === EXECUTE: UNIVERSAL SE REPOSITORY CHECKS ===
100+
101+
- repo: local
102+
hooks:
103+
104+
- id: markdownlint
105+
name: E1) Markdown lint
106+
language: system
107+
entry: npx markdownlint-cli2 --fix
108+
pass_filenames: false
109+
always_run: true
110+
111+
- id: se-validate-manifest
112+
name: E2) Validate SE manifest against schema
113+
language: system
114+
entry: uvx --from se-manifest-schema se-manifest validate-manifest --strict
115+
pass_filenames: false
116+
always_run: true
117+
118+
# === EXECUTE: ADDITIONAL REPO SPECIFIC LOGIC ===
119+
99120
# === GLOBAL SETTINGS ===
100121
# ALT: Set fail_fast to true to stop at first failure.
101122
fail_fast: false # Run all hooks even if one fails

0 commit comments

Comments
 (0)