Skip to content

chore(deps): update github/codeql-action digest to 42947a3 - autoclosed #22

chore(deps): update github/codeql-action digest to 42947a3 - autoclosed

chore(deps): update github/codeql-action digest to 42947a3 - autoclosed #22

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0 # hatch-vcs needs tags
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
enable-cache: true
- name: Ruff lint
# via the dev extra so CI lints with the same pinned ruff as local dev
run: uv run --extra dev ruff check --output-format=github .
- name: Ruff format
run: uv run --extra dev ruff format --check .
- name: SPDX headers
run: python scripts/check_spdx.py
types:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
enable-cache: true
- name: mypy
run: uv run --extra dev mypy
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
enable-cache: true
- name: Install a text font
# The render tests skip themselves without one, which would quietly
# gut this job down to the font-free half of the suite.
run: sudo apt-get update && sudo apt-get install -y fonts-dejavu-core
- name: Unit tier (no printer, no radio)
run: uv run --python ${{ matrix.python-version }} --extra dev pytest -q
render:
# Proves the thing still produces a label end to end, on every layout, and
# keeps the artifacts so a human can eyeball what the printer would burn.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5
with:
enable-cache: true
- run: sudo apt-get update && sudo apt-get install -y fonts-dejavu-core
- name: Render every layout
run: |
set -euo pipefail
for args in "--printer d110" "--printer d110 --die-cut" "--printer b1 --die-cut"; do
name=$(echo "$args" | tr -d ' -')
uv run labeltastic --sample --dry-run $args --out "badge-$name.png"
done
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: rendered-badges
path: badge-*.png