From fbffaddc5746cbb36df9da90c2c786021803feb9 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 Feb 2024 21:11:47 -0800 Subject: [PATCH 1/4] Try uv --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 656b0b1c..2a5c17a1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,8 +30,9 @@ jobs: (cd tests && gcc ext.c -fPIC -shared -o ext.so) - name: Install dependencies run: | - pip install -e '.[test]' - pip freeze + pip install uv + uv pip install -e '.[test]' + uv pip freeze - name: Run tests run: | pytest -n auto -m "not serial" From 308a15221b7f598cf33aebd9aa99d59da921ff42 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 Feb 2024 21:15:32 -0800 Subject: [PATCH 2/4] uv vent --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a5c17a1..22f40838 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,6 +31,7 @@ jobs: - name: Install dependencies run: | pip install uv + uv venv uv pip install -e '.[test]' uv pip freeze - name: Run tests From e9a5cea7024c9a87c3d0f33dfc3a48e1baeb87cd Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 Feb 2024 21:16:53 -0800 Subject: [PATCH 3/4] Activate venv --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22f40838..b66db671 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,6 +32,7 @@ jobs: run: | pip install uv uv venv + source .venv/bin/activate uv pip install -e '.[test]' uv pip freeze - name: Run tests From 40d3821a31c6b7ea1d2749b849546b4a5c95dd67 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Thu, 15 Feb 2024 21:18:37 -0800 Subject: [PATCH 4/4] Update test.yml --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b66db671..0b37df49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,6 +37,7 @@ jobs: uv pip freeze - name: Run tests run: | + source .venv/bin/activate pytest -n auto -m "not serial" pytest -m "serial" # And the test that exceeds a localhost HTTPS server @@ -44,17 +45,21 @@ jobs: - name: Install docs dependencies on Python 3.9+ if: matrix.python-version != '3.8' run: | + source .venv/bin/activate pip install -e '.[docs]' - name: Check if cog needs to be run if: matrix.python-version != '3.8' run: | + source .venv/bin/activate cog --check docs/*.rst - name: Check if blacken-docs needs to be run if: matrix.python-version != '3.8' run: | + source .venv/bin/activate # This fails on syntax errors, or a diff was applied blacken-docs -l 60 docs/*.rst - name: Test DATASETTE_LOAD_PLUGINS run: | + source .venv/bin/activate pip install datasette-init datasette-json-html tests/test-datasette-load-plugins.sh