From 2288f6ac2a0be2963dd919ecbe9638ab797b8a8c Mon Sep 17 00:00:00 2001 From: Maryanne Wachter Date: Wed, 22 Jan 2025 07:37:57 -0800 Subject: [PATCH] fix: adjust ci.yaml for uv --- .github/workflows/ci.yaml | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7f4fb83..2e589b8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,17 +29,22 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install poetry - poetry lock --no-update - poetry install + - name: Install uv (Unix) + if: runner.os != 'Windows' + run: curl -LsSf https://astral.sh/uv/install.sh | sh + + - name: Install uv (Windows) + if: runner.os == 'Windows' + run: powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.22/install.ps1 | iex" + + - name: Build and install package + run: uv build --editable . + + - name: Install test dependencies + run: uv pip install pytest black - name: Run tests - run: | - poetry run pytest . -vv + run: pytest . -vv - name: Lint with Black - run: | - poetry run black --check . + run: black --check .