Reference for all shared CI workflows in this repo.
Lint, format, type-check, and test a Python project using uv + ruff + pyright + pytest.
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
uses: tskovlund/.github/.github/workflows/python-ci.yml@mainInputs:
| Input | Default | Description |
|---|---|---|
python-version |
"3.13" |
Python version |
src-dir |
src/ |
Directory for pyright |
Steps: checkout, setup uv (cached), setup Python, uv sync, ruff check,
ruff format --check, pyright, pytest.
Run nix flake check with caching across configurable platforms.
name: Check
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
uses: tskovlund/.github/.github/workflows/nix-check.yml@main
with:
platforms: '["ubuntu-latest", "macos-latest"]'Inputs:
| Input | Default | Description |
|---|---|---|
platforms |
'["ubuntu-latest"]' |
JSON array of runner OS values |
Steps: checkout, install Nix (Determinate), magic Nix cache, flake checker,
nix flake check.
Run CodeQL security analysis. Requires GitHub Advanced Security on private repos.
name: CodeQL
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "0 6 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
uses: tskovlund/.github/.github/workflows/codeql.yml@main
with:
language: python
permissions:
security-events: writeInputs:
| Input | Required | Description |
|---|---|---|
language |
yes | CodeQL language (python, javascript-typescript, etc.) |
- All workflows use SHA-pinned third-party actions for supply chain security
- Permissions are explicitly declared at the workflow level
- Each workflow has a 10-minute timeout
- Reference with
@mainfrom tskovlund repos (trusted, auto-propagating) - Formatting is checked in every reusable workflow (
npx prettier@3 --check .). Covers markdown, JSON, YAML, and other supported file types. Consuming repos get this automatically — no separate workflow call needed. Add a.prettierignorefor build artifacts and vendored directories