From 0628dc515aacd46fab529913376a9c4464bb8df3 Mon Sep 17 00:00:00 2001 From: patrick Date: Sat, 17 Oct 2026 15:28:34 -0400 Subject: [PATCH] CI: install Python with uv instead of setup-python setup-python only ships builds for real Ubuntu releases and failed on the runner's ubuntu-latest image. uv's standalone builds work on any glibc Linux. make test now takes PYTHON=. Co-Authored-By: Claude Opus 5.5 --- .gitea/workflows/ci.yml | 14 +++++++++----- Makefile | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 0c91440..52a06bc 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,11 +16,15 @@ jobs: python: ["3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - run: python3 --version - - run: make test + # setup-python only has builds for real Ubuntu releases, and the runner's + # ubuntu-latest image isn't one. uv's standalone builds run on any glibc Linux. + - uses: astral-sh/setup-uv@v6 + - name: Install Python ${{ matrix.python }} + run: | + uv python install ${{ matrix.python }} + echo "PYTHON=$(uv python find ${{ matrix.python }})" >> "$GITHUB_ENV" + - run: $PYTHON --version + - run: make test PYTHON="$PYTHON" lint: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index e08dc17..f0db517 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ .PHONY: test lint +PYTHON ?= python3 + test: - python3 -m unittest discover -s tests + $(PYTHON) -m unittest discover -s tests lint: shellcheck agent/kernelwatch-agent agent/install.sh agent/deploy.sh server/install.sh server/kernelwatch.sh