Skip to content

Commit 9d9593d

Browse files
authored
CI: Lint and test via uv (#410)
1 parent 765b2d3 commit 9d9593d

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Tests
22

33
on: [push, pull_request, workflow_dispatch]
44

5+
permissions:
6+
contents: read
7+
58
env:
69
FORCE_COLOR: 1
710

@@ -16,25 +19,26 @@ jobs:
1619

1720
steps:
1821
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
1924

2025
- name: Set up Python ${{ matrix.python-version }}
2126
uses: actions/setup-python@v5
2227
with:
2328
python-version: ${{ matrix.python-version }}
2429
allow-prereleases: true
25-
cache: pip
30+
31+
- name: Install uv
32+
uses: hynek/setup-cached-uv@v2
33+
with:
2634
cache-dependency-path: |
2735
.github/workflows/ci.yml
2836
dev-requirements.txt
2937
requirements.txt
3038
31-
- name: Install dependencies
32-
run: |
33-
python3 -m pip install -U coverage tox
34-
35-
- name: Tests
39+
- name: Tox tests
3640
run: |
37-
tox -e py
41+
uvx --with tox-uv tox -e py
3842
3943
- name: Upload coverage
4044
uses: codecov/codecov-action@v4

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
persist-credentials: false
1719
- uses: actions/setup-python@v5
1820
with:
1921
python-version: "3.x"
20-
cache: pip
21-
- uses: pre-commit/action@v3.0.1
22+
- uses: tox-dev/action-pre-commit-uv@v1

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ env_list =
55
py{312, 311, 310, 39}
66

77
[testenv]
8+
deps =
9+
-r dev-requirements.txt
810
pass_env =
911
FORCE_COLOR
10-
commands_pre =
11-
{envpython} -m pip install -U -r dev-requirements.txt
1212
commands =
1313
{envpython} -m pytest {posargs}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy