ci: add multi-os test, lint, and wheel build workflows

Also fixes the sdist leaving wheels empty, pins subby to its git
source in wheel metadata, and fixes docstrings that broke mkdocs --strict.
This commit is contained in:
imSp4rky
2026-07-15 14:49:19 -06:00
parent 59a7c76b2f
commit d853ef9600
8 changed files with 140 additions and 33 deletions
+80
View File
@@ -0,0 +1,80 @@
name: ci
on:
push:
branches: [dev, main]
paths-ignore:
- "docs/**"
- "overrides/**"
- "mkdocs.yml"
- "**.md"
pull_request:
paths-ignore:
- "docs/**"
- "overrides/**"
- "mkdocs.yml"
- "**.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv sync --locked
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format
run: uv run ruff format --check .
- name: Import order
run: uv run isort --check-only unshackle tests --skip-glob "*/services/*"
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.11", "3.14"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install
run: uv sync --locked --group test
- name: Import check
run: uv run python -c "import unshackle; print(unshackle.__name__, 'imports OK')"
- name: CLI loads
run: uv run unshackle --help
- name: Tests
run: uv run pytest -m "not live and not slow"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Build sdist and wheel
run: uv build
- name: Smoke-test wheel
run: uv run --isolated --no-project --with dist/*.whl unshackle --help
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v4
+18
View File
@@ -8,13 +8,31 @@ on:
- "overrides/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
pull_request:
paths:
- "docs/**"
- "overrides/**"
- "mkdocs.yml"
- ".github/workflows/docs.yml"
workflow_dispatch:
permissions:
contents: write
jobs:
check:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install -e . -r docs/requirements-docs.txt
- run: mkdocs build --strict
deploy:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4