From 5b334bb6a4bc35749127fbb3b69679e000197d5f Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 21 Oct 2024 20:27:44 +0300 Subject: [PATCH] Lint and test with tox-uv --- .github/workflows/lint.yml | 11 +++++++---- .github/workflows/test.yml | 13 ++++++------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dd1dbbf..1d7c867 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,9 +21,12 @@ jobs: cache: pip - uses: pre-commit/action@v3.0.1 - - name: Install dependencies - run: | - python3 -m pip install -U tox + mypy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: hynek/setup-cached-uv@v2 - name: Mypy - run: tox -e mypy + run: uvx --with tox-uv tox -e mypy diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f5efef3..9732b50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,6 +2,9 @@ name: Test on: [push, pull_request, workflow_dispatch] +permissions: + contents: read + env: FORCE_COLOR: 1 @@ -22,7 +25,6 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true - cache: pip - name: Install Linux dependencies if: startsWith(matrix.os, 'ubuntu') @@ -34,11 +36,8 @@ jobs: run: | brew install gettext - - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -U wheel - python -m pip install -U tox + - name: Install uv + uses: hynek/setup-cached-uv@v2 - name: Generate translation binaries run: | @@ -46,7 +45,7 @@ jobs: - name: Tox tests run: | - tox -e py + uvx --with tox-uv tox -e py - name: Upload coverage uses: codecov/codecov-action@v3.1.5