Skip to content

Commit 042a3ab

Browse files
authored
Test with tox-uv (#226)
2 parents 5a0c9b4 + 2e074e4 commit 042a3ab

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

.github/workflows/test.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ permissions:
77

88
env:
99
FORCE_COLOR: 1
10-
PIP_DISABLE_PIP_VERSION_CHECK: 1
1110

1211
jobs:
1312
test:
@@ -26,25 +25,22 @@ jobs:
2625
with:
2726
python-version: ${{ matrix.python-version }}
2827
allow-prereleases: true
29-
cache: pip
3028

31-
- name: Install dependencies
32-
run: |
33-
python -m pip install -U pip
34-
python -m pip install -U tox
29+
- name: Install uv
30+
uses: hynek/setup-cached-uv@v2
3531

3632
- name: Tox tests
3733
run: |
38-
tox -e py
34+
uvx --with tox-uv tox -e py
3935
4036
- name: Test CLI
4137
run: |
42-
tox -e cli
38+
uvx --with tox-uv tox -e cli
4339
4440
- name: Tox tests (pins)
4541
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
4642
run: |
47-
tox -e pins
43+
uvx --with tox-uv tox -e pins
4844
4945
- name: Upload coverage
5046
uses: codecov/[email protected]

pyproject.toml

+5-4
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,11 @@ lint.select = [
8585
"YTT", # flake8-2020
8686
]
8787
lint.ignore = [
88-
"E203", # Whitespace before ':'
89-
"E221", # Multiple spaces before operator
90-
"E226", # Missing whitespace around arithmetic operator
91-
"E241", # Multiple spaces after ','
88+
"E203", # Whitespace before ':'
89+
"E221", # Multiple spaces before operator
90+
"E226", # Missing whitespace around arithmetic operator
91+
"E241", # Multiple spaces after ','
92+
"UP038", # Makes code slower and more verbose
9293
]
9394
lint.flake8-import-conventions.aliases.datetime = "dt"
9495
lint.flake8-import-conventions.banned-from = [ "datetime" ]

tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ commands =
4646
pre-commit run --all-files --show-diff-on-failure
4747

4848
[testenv:pins]
49+
deps =
50+
-r requirements.txt
4951
extras =
5052
None
51-
commands_pre =
52-
{envpython} -m pip install -r requirements.txt

0 commit comments

Comments
 (0)