40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
name: Case Collision Check
|
|
|
|
# Rejects PRs that track two files whose paths differ only by case
|
|
# (README.md vs readme.md, src/Foo.py vs SRC/foo.py).
|
|
#
|
|
# Linux is case-sensitive; Windows and macOS (default) are not. A
|
|
# case-colliding pair lives fine in a Linux checkout and silently breaks
|
|
# every clone on a case-insensitive host — the filesystem can hold only
|
|
# one of them, so checkout fails or whichever wins overwrites the other.
|
|
# Git won't prevent the pair from landing (it only warns at checkout time,
|
|
# on a case-insensitive FS, for the client doing the checkout), so the only
|
|
# enforcement point is CI, on Linux, against the index.
|
|
#
|
|
# Runs unconditionally (no change-classifier gate): a collision can ship in
|
|
# any kind of PR — docs, JS, config, not just Python — so gating on a
|
|
# language lane would be the same "passive rule that cannot enforce a
|
|
# policy" trap the infographic check exists to close.
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
commit:
|
|
description: Commit to test and build. Empty keeps the triggering commit.
|
|
type: string
|
|
default: ''
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
check-case-collisions:
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
timeout-minutes: 5
|
|
steps:
|
|
- uses: useblacksmith/checkout@25227e61ff9dafe400e22fa487b673eac4e4409a # v1
|
|
with:
|
|
ref: ${{ inputs.commit }}
|
|
- name: Run case-collision checker
|
|
run: python3 scripts/check-case-collisions.py
|