Skip to content

Commit d7121a6

Browse files
committed
Use uv in the CI
Signed-off-by: Gaëtan Lehmann <[email protected]>
1 parent 516727e commit d7121a6

File tree

4 files changed

+33
-43
lines changed

4 files changed

+33
-43
lines changed

.github/workflows/code-checkers.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,28 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v4
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
1212
with:
13-
python-version: 3.8
13+
version: "0.7.x"
1414
- name: Install dependencies
15-
run: |
16-
python -m pip install --upgrade pip
17-
pip install -r requirements/base.txt
18-
pip install mypy
15+
run: uv sync --frozen
1916
- name: Create a dummy data.py
2017
run: cp data.py-dist data.py
2118
- name: Install additional typing data and check with mypy
22-
run: mypy --install-types --non-interactive lib/ conftest.py pkgfixtures.py tests/
19+
run: uv run mypy --install-types --non-interactive lib/ conftest.py pkgfixtures.py tests/
2320

2421
pyright:
2522
runs-on: ubuntu-latest
2623
steps:
2724
- uses: actions/checkout@v2
28-
- name: Set up Python
29-
uses: actions/setup-python@v4
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
3027
with:
31-
python-version: 3.8
28+
version: "0.7.x"
3229
- name: Install dependencies
33-
run: |
34-
python -m pip install --upgrade pip
35-
pip install -r requirements/base.txt
36-
pip install pyright
30+
run: uv sync --frozen
3731
- name: Create a dummy data.py
3832
run: cp data.py-dist data.py
3933
- name: Check with pyright
40-
run: pyright lib/ conftest.py pkgfixtures.py # tests/
34+
run: uv run pyright lib/ conftest.py pkgfixtures.py # tests/

.github/workflows/format.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,24 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v4
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
12+
with:
13+
version: "0.7.x"
1214
- name: Install dependencies
13-
run: |
14-
python -m pip install --upgrade pip
15-
pip install flake8
15+
run: uv sync --frozen
1616
- name: flake8
17-
run: |
18-
flake8
17+
run: uv run flake8
1918

2019
pydocstyle:
2120
runs-on: ubuntu-latest
2221
steps:
2322
- uses: actions/checkout@v2
24-
- name: Set up Python
25-
uses: actions/setup-python@v2
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
version: "0.7.x"
2627
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install pydocstyle
28+
run: uv sync --frozen
3029
- name: pydocstyle
31-
run: |
32-
pydocstyle
30+
run: uv run pydocstyle

.github/workflows/jobs-check.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v4
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
1212
with:
13-
python-version: 3.8
13+
version: "0.7.x"
1414
- name: Install dependencies
15-
run: |
16-
python -m pip install --upgrade pip
17-
pip install -r requirements/base.txt
15+
run: uv sync --frozen
1816
- name: Create a dummy data.py
1917
run: cp data.py-dist data.py
2018
- name: jobs-check
21-
run: ./jobs.py check
19+
run: uv run ./jobs.py check

.github/workflows/test-sequences.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- name: Set up Python
11-
uses: actions/setup-python@v4
10+
- name: Install uv
11+
uses: astral-sh/setup-uv@v6
12+
with:
13+
version: "0.7.x"
1214
- name: Install dependencies
13-
run: |
14-
python -m pip install --upgrade pip
15-
pip install -r requirements/base.txt
15+
run: uv sync --frozen
1616
- name: Create a dummy data.py
1717
run: cp data.py-dist data.py
1818
- name: jobs-check
1919
run: |
2020
FAILURES=""
2121
for seq in $(find -name "*.lst"); do
22-
if ! pytest @$seq --collect-only --quiet; then
22+
if ! uv run pytest @$seq --collect-only --quiet; then
2323
FAILURES="$FAILURES $seq"
2424
fi
2525
done

0 commit comments

Comments
 (0)