From e52e1948a65b07a20f62547dd9014c4e6a54ef64 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 22 Dec 2025 22:22:41 +0100 Subject: [PATCH] gha: switch to setup-uv --- .github/workflows/ci.yml | 11 +++++------ .github/workflows/lint.yml | 11 +++++------ .github/workflows/release.yml | 1 + 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b23f3158..7fa4a64d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,10 +42,11 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + - name: Set up uv (python ${{matrix.python}}) + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python }} + activate-environment: true - name: set PY_CACHE_KEY run: echo "PY_CACHE_KEY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV @@ -56,11 +57,9 @@ jobs: path: ${{ github.workspace }}/.nox/tests-${{ matrix.python }} key: "nox|${{ matrix.os }}|tests-${{ matrix.python }}|${{ env.PY_CACHE_KEY }}|${{ hashFiles('noxfile.py', 'setup.py', 'pyproject.toml') }}" - - name: Install tools and print info + - name: Install nox run: | - pip install -U pip uv nox - pip --version - uv --version + pip install -U nox nox --version - name: Test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 59932108..2509f06b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,10 +33,11 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v5 + - name: Set up uv (python ${{matrix.python}}) + uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python }} + activate-environment: true - name: set PY_CACHE_KEY run: echo "PY_CACHE_KEY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV @@ -46,11 +47,9 @@ jobs: path: ${{ github.workspace }}/.nox/lint key: "nox-lint|${{ matrix.os }}|${{ env.PY_CACHE_KEY }}|${{ hashFiles('noxfile.py', 'setup.py', 'pyproject.toml') }}" - - name: Install tools + - name: Install nox run: | - pip install -U pip uv nox - pip --version - uv --version + uv pip install nox nox --version - name: Lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88617a55..3649d82d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,7 @@ jobs: - uses: astral-sh/setup-uv@v7 with: python-version: "3.13" + activate-environment: true - name: check if release id: is-release run: |