Skip to content

Commit eec8989

Browse files
committed
Modernize all GitHub Actions workflows to use uv
- Update publish-to-test-pypi.yml and publish-to-live-pypi.yml to use uv instead of pip - Update lint.yml to use uv for ruff and mypy installations - Upgrade setup-python action from v3 to v5.2.0 in publish workflows - Add uv caching for better performance across all workflows - Replace pip install commands with uv pip install --system - Ensure consistent package management across all CI jobs
1 parent 6e6887f commit eec8989

File tree

3 files changed

+32
-20
lines changed

3 files changed

+32
-20
lines changed

.github/workflows/lint.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ jobs:
1717
uses: actions/[email protected]
1818
with:
1919
python-version: "3.13"
20-
cache: 'pip'
21-
- run: |
22-
python -m pip install --upgrade pip
23-
pip install ruff
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
23+
with:
24+
enable-cache: true
25+
26+
- name: Install ruff
27+
run: uv pip install --system ruff
2428
- name: Run Ruff
2529
run: |
2630
ruff check json2xml
@@ -37,8 +41,14 @@ jobs:
3741
uses: actions/[email protected]
3842
with:
3943
python-version: '3.13'
40-
cache: 'pip'
41-
- run: pip install --upgrade mypy types-requests types-urllib3
44+
45+
- name: Install uv
46+
uses: astral-sh/setup-uv@v6
47+
with:
48+
enable-cache: true
49+
50+
- name: Install mypy and types
51+
run: uv pip install --system mypy types-requests types-urllib3
4252
- name: mypy
4353
uses: liskin/gh-problem-matcher-wrap@v2
4454
with:

.github/workflows/publish-to-live-pypi.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@ jobs:
1212
steps:
1313
- uses: actions/[email protected]
1414
- name: Set up Python 3.12
15-
uses: actions/setup-python@v3
15+
uses: actions/setup-python@v5.2.0
1616
with:
1717
python-version: '3.12'
1818

19-
- name: Install pypa/build
20-
run: >-
21-
python -m
22-
pip install
23-
build
24-
--user
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v6
21+
with:
22+
enable-cache: true
23+
24+
- name: Install build dependencies
25+
run: uv pip install --system build
2526
- name: Build a binary wheel and a source tarball
2627
run: >-
2728
python -m

.github/workflows/publish-to-test-pypi.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ jobs:
1313
steps:
1414
- uses: actions/[email protected]
1515
- name: Set up Python 3.12
16-
uses: actions/setup-python@v3
16+
uses: actions/setup-python@v5.2.0
1717
with:
1818
python-version: '3.12'
1919

20-
- name: Install pypa/build
21-
run: >-
22-
python -m
23-
pip install
24-
build
25-
--user
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v6
22+
with:
23+
enable-cache: true
24+
25+
- name: Install build dependencies
26+
run: uv pip install --system build
2627
- name: Build a binary wheel and a source tarball
2728
run: >-
2829
python -m

0 commit comments

Comments
 (0)