ci(ebook-search): run tests via uv on the runner instead of docker
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 27s
build_systems / build-brain (pull_request) Successful in 44s
build_systems / build-bob (pull_request) Successful in 47s
build_systems / build-rhapsody-in-green (pull_request) Successful in 56s
build_systems / build-jeeves (pull_request) Successful in 2m54s
test ebook search / test-ebook-search (pull_request) Failing after 19s
treefmt / nix fmt (pull_request) Successful in 5s
pytest / pytest (pull_request) Successful in 27s
build_systems / build-brain (pull_request) Successful in 44s
build_systems / build-bob (pull_request) Successful in 47s
build_systems / build-rhapsody-in-green (pull_request) Successful in 56s
build_systems / build-jeeves (pull_request) Successful in 2m54s
test ebook search / test-ebook-search (pull_request) Failing after 19s
The gitea runner containers have no docker access, so build the test env with uv from the existing lockfile and run pytest directly: - test_ebook_search workflow: uv sync --locked + uv run pytest, with UV_PYTHON_DOWNLOADS=never so uv uses the nix-provided python 3.14 - add uv to the runner hostPackages (needs a jeeves rebuild to apply) - ignore nested **/.venv in .dockerignore (uv sync creates one in python/ebook_search/docker) - document the uv test commands in the docker README; the docker test image remains for validating the image itself
This commit is contained in:
@@ -9,13 +9,16 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
UV_PYTHON_DOWNLOADS: never
|
||||
|
||||
jobs:
|
||||
test-ebook-search:
|
||||
runs-on: self-hosted
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build test image
|
||||
run: docker build --file python/ebook_search/docker/Dockerfile --target test --tag ebook-search:test .
|
||||
- name: Install dependencies
|
||||
run: uv sync --locked --project python/ebook_search/docker
|
||||
- name: Run ebook search tests
|
||||
run: docker run --rm ebook-search:test
|
||||
run: uv run --project python/ebook_search/docker --no-sync pytest tests/ebook_search --override-ini addopts="-n auto -ra"
|
||||
|
||||
Reference in New Issue
Block a user