Skip to content

Commit 6c25509

Browse files
committed
refactor: use uv more in github actions
1 parent eb60f11 commit 6c25509

File tree

2 files changed

+11
-24
lines changed

2 files changed

+11
-24
lines changed

.github/workflows/pypi-publish-on-release.yml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,17 @@ jobs:
2727
persist-credentials: false
2828

2929
- name: Set up Python
30-
uses: actions/setup-python@v5
30+
uses: astral-sh/setup-uv@v4
3131
with:
32+
enable-cache: true
3233
python-version: '3.10'
3334

34-
- name: Install dependencies
35-
run: |
36-
python -m pip install --upgrade pip
37-
pip install hatch twine # Keep hatch for versioning and building
38-
39-
- name: Validate version
40-
run: |
41-
version=$(hatch version)
42-
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
43-
echo "Valid version format"
44-
exit 0
45-
else
46-
echo "Invalid version format"
47-
exit 1
48-
fi
35+
- name: Sync dependencies from lock file
36+
run: uv sync --all-groups --all-extras --all-packages
4937

5038
- name: Build
5139
run: |
52-
hatch build
40+
uv build
5341
5442
- name: Store the distribution packages
5543
uses: actions/upload-artifact@v4

.github/workflows/test-lint.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ jobs:
5656
ref: ${{ inputs.ref }} # Explicitly define which commit to check out
5757
persist-credentials: false # Don't persist credentials for subsequent actions
5858
- name: Set up Python
59-
uses: actions/setup-python@v5
59+
uses: astral-sh/setup-uv@v4
6060
with:
61+
enable-cache: true
6162
python-version: ${{ matrix.python-version }}
63+
6264
- name: Install uv
6365
uses: astral-sh/setup-uv@v4
6466
with:
@@ -82,17 +84,14 @@ jobs:
8284
persist-credentials: false
8385

8486
- name: Set up Python
85-
uses: actions/setup-python@v5
86-
with:
87-
python-version: '3.10'
88-
89-
- name: Install uv
9087
uses: astral-sh/setup-uv@v4
9188
with:
9289
enable-cache: true
90+
python-version: ${{ matrix.python-version }}
91+
9392

9493
- name: Sync dependencies from lock file
95-
run: uv sync --dev
94+
run: uv sync --all-groups --all-extras --all-packages
9695

9796
- name: Run lint
9897
id: lint

0 commit comments

Comments
 (0)