Skip to content

Commit

Permalink
ci: update uv and move into reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eginhard committed Nov 10, 2024
1 parent 2df9bfa commit 9a01c90
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 26 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout and setup uv
uses: ./.github/workflows/setup-uv.yml
- name: Verify tag matches version
run: |
set -ex
Expand All @@ -19,12 +20,6 @@ jobs:
if [[ "v$version" != "$tag" ]]; then
exit 1
fi
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python
run: uv python install 3.12
- name: Build sdist and wheel
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/setup-uv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .github/workflows/setup-uv.yml
name: Checkout and setup uv

on:
workflow_call: {}

jobs:
setup-uv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.1"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
9 changes: 2 additions & 7 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ jobs:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Checkout and setup uv
uses: ./.github/workflows/setup-uv.yml
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Lint check
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@ jobs:
python-version: [3.9, "3.10", "3.11", "3.12"]
subset: ["data_tests", "inference_tests", "test_aux", "test_text", "test_tts", "test_tts2", "test_vocoder", "test_xtts", "test_zoo0", "test_zoo1", "test_zoo2"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Checkout and setup uv
uses: ./.github/workflows/setup-uv.yml
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install Espeak
Expand Down Expand Up @@ -57,11 +52,8 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.27"
- name: Checkout and setup uv
uses: ./.github/workflows/setup-uv.yml
- uses: actions/download-artifact@v4
with:
pattern: coverage-data-*
Expand Down

0 comments on commit 9a01c90

Please sign in to comment.