mirror of
https://github.com/usestrix/strix.git
synced 2026-10-12 03:47:56 +00:00
Add uv lock --check, a wheel install smoke test, a PyInstaller dry run, actionlint and zizmor on the workflows, CodeQL, and Dependabot for action pins, uv, Go and npm dependencies. Release caches are disabled so zizmor's cache-poisoning audit passes.
61 lines
1.7 KiB
YAML
61 lines
1.7 KiB
YAML
name: Python
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lock:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
|
|
- run: uv lock --check
|
|
|
|
ruff:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-python-env
|
|
- run: uv run --frozen ruff check .
|
|
- run: uv run --frozen ruff format --check .
|
|
|
|
mypy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-python-env
|
|
- run: uv run --frozen mypy strix/
|
|
|
|
bandit:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-python-env
|
|
- run: uv run --frozen bandit -r strix/ -c pyproject.toml
|
|
|
|
pytest:
|
|
name: pytest (${{ matrix.python-version }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ['3.12', '3.13', '3.14']
|
|
steps:
|
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
with:
|
|
persist-credentials: false
|
|
- uses: ./.github/actions/setup-python-env
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
- run: uv run --frozen pytest -q
|