From f514d67e97f2a58eab14ee477c6c8658543b8d22 Mon Sep 17 00:00:00 2001 From: Aaron Meyer Date: Thu, 27 Aug 2026 16:15:39 -0700 Subject: [PATCH] Add shared Python CI workflow template (uv + ruff + pytest) --- .../python-uv-ruff-pytest.properties.json | 7 ++++++ workflow-templates/python-uv-ruff-pytest.yml | 25 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 workflow-templates/python-uv-ruff-pytest.properties.json create mode 100644 workflow-templates/python-uv-ruff-pytest.yml diff --git a/workflow-templates/python-uv-ruff-pytest.properties.json b/workflow-templates/python-uv-ruff-pytest.properties.json new file mode 100644 index 0000000..c60767b --- /dev/null +++ b/workflow-templates/python-uv-ruff-pytest.properties.json @@ -0,0 +1,7 @@ +{ + "name": "Python CI (uv + ruff + pytest)", + "description": "Lint, format-check, type-check, and test a uv-managed Python package with ruff, ty, and pytest, matching the pattern used across RISE, tHMM, DDMC, and parafac2.", + "categories": [ + "Python" + ] +} diff --git a/workflow-templates/python-uv-ruff-pytest.yml b/workflow-templates/python-uv-ruff-pytest.yml new file mode 100644 index 0000000..0600581 --- /dev/null +++ b/workflow-templates/python-uv-ruff-pytest.yml @@ -0,0 +1,25 @@ +name: Test + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + - name: Install dependencies + run: uv sync + - name: Lint with ruff + run: uv run ruff check . + - name: Check formatting with ruff + run: uv run ruff format --check . + - name: Type check with ty + run: uv run ty check + - name: Test with pytest + run: uv run pytest --cov