From 21dd904ee659dae2809ce9d2ae058df026db5f3d Mon Sep 17 00:00:00 2001 From: Pamela Fox Date: Mon, 21 Oct 2024 21:27:43 +0000 Subject: [PATCH] Port to uv --- .github/workflows/app-tests.yaml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/app-tests.yaml b/.github/workflows/app-tests.yaml index 882ff5d..3c8e0d4 100644 --- a/.github/workflows/app-tests.yaml +++ b/.github/workflows/app-tests.yaml @@ -24,12 +24,6 @@ jobs: test-package: name: Test ${{ matrix.os }} Python ${{ matrix.python_version }} runs-on: ${{ matrix.os }} - env: - POSTGRES_HOST: localhost - POSTGRES_USERNAME: postgres - POSTGRES_PASSWORD: root - POSTGRES_DATABASE: postgres - POSTGRES_SSL: disable strategy: fail-fast: false matrix: @@ -40,6 +34,13 @@ jobs: exclude: - os: macos-latest-xlarge python_version: "3.10" + env: + UV_SYSTEM_PYTHON: 1 + POSTGRES_HOST: localhost + POSTGRES_USERNAME: postgres + POSTGRES_PASSWORD: root + POSTGRES_DATABASE: postgres + POSTGRES_SSL: disable steps: - uses: actions/checkout@v4 @@ -74,13 +75,20 @@ jobs: python-version: ${{ matrix.python_version }} architecture: x64 + - name: Install uv + uses: astral-sh/setup-uv@v3 + with: + enable-cache: true + version: "0.4.20" + cache-dependency-glob: "requirements**.txt" + - name: Install dependencies run: | - python -m pip install -r requirements-dev.txt + uv pip install -r requirements-dev.txt - name: Install app as editable app run: | - python -m pip install -e src/backend + uv pip install -e src/backend - name: Setup local database with seed data run: |