Skip to content

Commit 9a01c90

Browse files
committed
ci: update uv and move into reusable workflow
1 parent 2df9bfa commit 9a01c90

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

.github/workflows/pypi-release.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v4
13+
- name: Checkout and setup uv
14+
uses: ./.github/workflows/setup-uv.yml
1415
- name: Verify tag matches version
1516
run: |
1617
set -ex
@@ -19,12 +20,6 @@ jobs:
1920
if [[ "v$version" != "$tag" ]]; then
2021
exit 1
2122
fi
22-
- name: Install uv
23-
uses: astral-sh/setup-uv@v3
24-
with:
25-
version: "0.4.27"
26-
enable-cache: true
27-
cache-dependency-glob: "**/pyproject.toml"
2823
- name: Set up Python
2924
run: uv python install 3.12
3025
- name: Build sdist and wheel

.github/workflows/setup-uv.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# .github/workflows/setup-uv.yml
2+
name: Checkout and setup uv
3+
4+
on:
5+
workflow_call: {}
6+
7+
jobs:
8+
setup-uv:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install uv
13+
uses: astral-sh/setup-uv@v3
14+
with:
15+
version: "0.5.1"
16+
enable-cache: true
17+
cache-dependency-glob: "**/pyproject.toml"

.github/workflows/style_check.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,8 @@ jobs:
1414
matrix:
1515
python-version: [3.9]
1616
steps:
17-
- uses: actions/checkout@v4
18-
- name: Install uv
19-
uses: astral-sh/setup-uv@v3
20-
with:
21-
version: "0.4.27"
22-
enable-cache: true
23-
cache-dependency-glob: "**/pyproject.toml"
17+
- name: Checkout and setup uv
18+
uses: ./.github/workflows/setup-uv.yml
2419
- name: Set up Python ${{ matrix.python-version }}
2520
run: uv python install ${{ matrix.python-version }}
2621
- name: Lint check

.github/workflows/tests.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,8 @@ jobs:
1515
python-version: [3.9, "3.10", "3.11", "3.12"]
1616
subset: ["data_tests", "inference_tests", "test_aux", "test_text", "test_tts", "test_tts2", "test_vocoder", "test_xtts", "test_zoo0", "test_zoo1", "test_zoo2"]
1717
steps:
18-
- uses: actions/checkout@v4
19-
- name: Install uv
20-
uses: astral-sh/setup-uv@v3
21-
with:
22-
version: "0.4.27"
23-
enable-cache: true
24-
cache-dependency-glob: "**/pyproject.toml"
18+
- name: Checkout and setup uv
19+
uses: ./.github/workflows/setup-uv.yml
2520
- name: Set up Python ${{ matrix.python-version }}
2621
run: uv python install ${{ matrix.python-version }}
2722
- name: Install Espeak
@@ -57,11 +52,8 @@ jobs:
5752
needs: test
5853
runs-on: ubuntu-latest
5954
steps:
60-
- uses: actions/checkout@v4
61-
- name: Install uv
62-
uses: astral-sh/setup-uv@v3
63-
with:
64-
version: "0.4.27"
55+
- name: Checkout and setup uv
56+
uses: ./.github/workflows/setup-uv.yml
6557
- uses: actions/download-artifact@v4
6658
with:
6759
pattern: coverage-data-*

0 commit comments

Comments
 (0)