Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e82f39d

Browse files
committed
Use uv in github actions
1 parent 4c613d3 commit e82f39d

File tree

5 files changed

+67
-23
lines changed

5 files changed

+67
-23
lines changed

‎.github/workflows/benchmark.yml‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,28 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v5
16+
- name: Checkout project
17+
id: checkout
18+
uses: actions/checkout@v5
1719

1820
- name: Set up Python 3.13
19-
uses: actions/setup-python@v6
2021
id: setup-python
22+
uses: actions/setup-python@v6
2123
with:
2224
python-version: "3.13"
2325
architecture: x64
2426

27+
- name: Install uv
28+
id: setup-uv
29+
uses: astral-sh/setup-uv@v6
30+
2531
- name: Install tox
32+
id: install-tox
2633
run: |
27-
python -m pip install --upgrade pip
28-
python -m pip install tox tox-uv uv
34+
uv pip install --system tox tox-uv
2935
3036
- name: Run benchmarks with CodSpeed
37+
id: run-benchmarks
3138
uses: CodSpeedHQ/action@v4
3239
with:
3340
mode: instrumentation

‎.github/workflows/lint.yml‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,27 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v5
11+
- name: Checkout project
12+
id: checkout
13+
uses: actions/checkout@v5
1214

1315
- name: Set up Python 3.13
16+
id: setup-python
1417
uses: actions/setup-python@v6
1518
with:
16-
python-version: '3.13'
19+
python-version: "3.13"
20+
21+
- name: Install uv
22+
id: setup-uv
23+
uses: astral-sh/setup-uv@v6
1724

1825
- name: Install tox
26+
id: install-tox
1927
run: |
20-
python -m pip install --upgrade pip
21-
python -m pip install tox uv tox-uv
28+
uv pip install --system tox tox-uv
2229
2330
- name: Run code quality tests with tox
31+
id: lint
2432
run: tox
2533
env:
2634
TOXENV: ruff,mypy,docs

‎.github/workflows/publish.yml‎

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,26 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v5
14+
- name: Checkout project
15+
id: checkout
16+
uses: actions/checkout@v5
1517

1618
- name: Set up Python 3.13
19+
id: setup-python
1720
uses: actions/setup-python@v6
1821
with:
19-
python-version: '3.13'
22+
python-version: "3.13"
23+
24+
- name: Install uv
25+
id: setup-uv
26+
uses: astral-sh/setup-uv@v6
27+
28+
- name: Build wheel and source tarball with uv
29+
id: build
30+
run: uv build
2031

21-
- name: Build wheel and source tarball with uv_build
22-
run: |
23-
python -m pip install --upgrade pip
24-
python -m pip install uv_build
25-
python -m uv_build build
2632
- name: Publish a Python distribution to PyPI
33+
id: publish
2734
uses: pypa/gh-action-pypi-publish@release/v1
2835
with:
2936
user: __token__

‎.github/workflows/test.yml‎

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,30 @@ jobs:
1212
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', 'pypy3.9', 'pypy3.10']
1313

1414
steps:
15-
- uses: actions/checkout@v5
15+
- name: Checkout project
16+
id: checkout
17+
uses: actions/checkout@v5
1618

1719
- name: Set up Python ${{ matrix.python-version }}
20+
id: setup-python
1821
uses: actions/setup-python@v6
1922
with:
2023
python-version: ${{ matrix.python-version }}
2124

25+
- name: Install uv
26+
id: setup-uv
27+
uses: astral-sh/setup-uv@v6
28+
with:
29+
enable-cache: true
30+
cache-suffix: ${{ matrix.python-version }}
31+
2232
- name: Install tox and plugins
33+
id: install-tox
2334
run: |
24-
python -m pip install tox tox-gh-actions tox-uv uv
35+
uv pip install --system tox tox-uv tox-gh-actions
2536
2637
- name: Run unit tests with tox
38+
id: test
2739
run: tox
2840

2941
tests-old:
@@ -35,23 +47,33 @@ jobs:
3547
python-version: ['3.7', '3.8']
3648

3749
steps:
38-
- uses: actions/checkout@v5
50+
- name: Checkout project
51+
id: checkout
52+
uses: actions/checkout@v5
3953

4054
- name: Set up Python 3.13 (tox runner)
55+
id: setup-python
4156
uses: actions/setup-python@v6
4257
with:
4358
python-version: '3.13'
4459

45-
- name: Install tox and plugins (with Python 3.13)
60+
- name: Install uv
61+
id: setup-uv
62+
uses: astral-sh/setup-uv@v6
63+
64+
- name: Install tox and plugins
65+
id: install-tox
4666
run: |
47-
python3.13 -m pip install tox tox-gh-actions tox-uv uv
67+
uv pip install --system tox tox-uv tox-gh-actions
4868
4969
- name: Set up target Python ${{ matrix.python-version }}
70+
id: setup-target-python
5071
uses: actions/setup-python@v6
5172
with:
5273
python-version: ${{ matrix.python-version }}
5374

5475
- name: Run unit tests with tox for target
76+
id: test
5577
shell: bash
5678
run: |
5779
ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}

‎tox.ini‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ commands =
4747
[testenv]
4848
dependency_groups = test
4949
commands =
50-
# to also run the time-consuming tests: tox -e py312 -- --run-slow
51-
# to run the benchmarks: tox -e py312 -- -k benchmarks --benchmark-enable
52-
py3{7,8,9,10,11,13},pypy3{9,10}: python -m pytest tests {posargs}
50+
# to also run the time-consuming tests: tox -e py313 -- --run-slow
51+
# to run the benchmarks: tox -e py313 -- -k benchmarks --benchmark-enable
52+
py3{7,8,9,10,11,12},pypy3{9,10}: python -m pytest tests {posargs}
5353
py313: python -m pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /