Skip to content

README clarifications #124

README clarifications

README clarifications #124

Workflow file for this run

name: CI
on:
push:
branches: ["**"]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: Check formatting
run: ruff format --check
- name: Check linting
run: ruff check
- name: Check README.md links are absolute (PyPI compatibility)
run: |
# PyPI's README renderer does not resolve relative links, so any
# link in README.md to a repo file must be an absolute GitHub URL
# (or a same-document anchor). See CLAUDE.md → "README.md links".
# Match all `](...)` patterns; filter out absolute (http/https) and
# anchor (#) targets. Anything left is a relative link → fail red.
if relative=$(grep -nE '\]\(' README.md | grep -vE '\]\((https?:|#)') ; then
echo "::error file=README.md::README.md contains relative links that will not render on PyPI. Use absolute https://github.com/greg-latuszek/alcatrazer/blob/main/<path> URLs. See CLAUDE.md → 'README.md links' for the rule."
echo ""
echo "Offending lines:"
echo "$relative"
exit 1
fi
echo "All README.md links are absolute or same-document anchors."
test:
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Configure git identity for tests
run: |
git config --global user.name "CI Test"
git config --global user.email "ci@test.local"
git config --global init.defaultBranch main
- name: Run tests
env:
PYTHONPATH: src
run: python -m unittest discover -s src/alcatrazer/tests -v