From 2e074e427039259f96064b26ac5393da807568b9 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Thu, 17 Oct 2024 21:30:02 +0300 Subject: [PATCH] Test with tox-uv --- .github/workflows/test.yml | 14 +++++--------- pyproject.toml | 9 +++++---- tox.ini | 4 ++-- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9b9550a..2dc085e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,6 @@ permissions: env: FORCE_COLOR: 1 - PIP_DISABLE_PIP_VERSION_CHECK: 1 jobs: test: @@ -26,25 +25,22 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true - cache: pip - - name: Install dependencies - run: | - python -m pip install -U pip - python -m pip install -U tox + - name: Install uv + uses: hynek/setup-cached-uv@v2 - name: Tox tests run: | - tox -e py + uvx --with tox-uv tox -e py - name: Test CLI run: | - tox -e cli + uvx --with tox-uv tox -e cli - name: Tox tests (pins) if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' run: | - tox -e pins + uvx --with tox-uv tox -e pins - name: Upload coverage uses: codecov/codecov-action@v3.1.5 diff --git a/pyproject.toml b/pyproject.toml index 3cdac46..9d6cb88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,10 +85,11 @@ lint.select = [ "YTT", # flake8-2020 ] lint.ignore = [ - "E203", # Whitespace before ':' - "E221", # Multiple spaces before operator - "E226", # Missing whitespace around arithmetic operator - "E241", # Multiple spaces after ',' + "E203", # Whitespace before ':' + "E221", # Multiple spaces before operator + "E226", # Missing whitespace around arithmetic operator + "E241", # Multiple spaces after ',' + "UP038", # Makes code slower and more verbose ] lint.flake8-import-conventions.aliases.datetime = "dt" lint.flake8-import-conventions.banned-from = [ "datetime" ] diff --git a/tox.ini b/tox.ini index 7132ec8..cb0dfdf 100644 --- a/tox.ini +++ b/tox.ini @@ -46,7 +46,7 @@ commands = pre-commit run --all-files --show-diff-on-failure [testenv:pins] +deps = + -r requirements.txt extras = None -commands_pre = - {envpython} -m pip install -r requirements.txt