Skip to content

Commit 0133c48

Browse files
committed
add test workflows, fix minor bugs
1 parent 26f48a4 commit 0133c48

File tree

6 files changed

+109
-4
lines changed

6 files changed

+109
-4
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test pip install on 3 platforms
2+
3+
on:
4+
workflow_dispatch:
5+
# push:
6+
# branches:
7+
# - main
8+
9+
jobs:
10+
build:
11+
strategy:
12+
max-parallel: 4
13+
matrix:
14+
platform: [ubuntu-latest, macos-12, windows-latest]
15+
python-version: ["3.10"]
16+
17+
runs-on: ${{ matrix.platform }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Install locally
28+
# if: matrix.platform == 'windows-latest'
29+
# also test with uv
30+
run: |
31+
python -m pip install install torch==2.3.1
32+
python -m pip install --upgrade pip==23.3.2
33+
python -m pip install -r requirements.txt
34+
python -m pip install -r requirements_bark_hubert_quantizer.txt
35+
python -m pip install -r requirements_rvc.txt
36+
python -m pip install -r requirements_audiocraft_0.txt
37+
python -m pip install -r requirements_audiocraft.txt
38+
python -m pip install -r requirements_styletts2.txt
39+
python -m pip install -r requirements_vall_e.txt
40+
python -m pip install -r requirements_maha_tts.txt
41+
python -m pip install -r requirements_stable_audio.txt
42+
python -m pip install hydra-core==1.3.2
43+
python -m pip install nvidia-ml-py
44+
45+
# - name: Check installation
46+
# working-directory: /tmp
47+
# run: python $GITHUB_WORKSPACE/scripts/check_installation.py
48+
49+
- name: Lint with ruff
50+
run: ruff check .
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Test if React UI builds
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Detect package manager
16+
id: detect-package-manager
17+
working-directory: react-ui
18+
run: |
19+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
20+
echo "manager=yarn" >> $GITHUB_OUTPUT
21+
echo "command=install" >> $GITHUB_OUTPUT
22+
echo "runner=yarn" >> $GITHUB_OUTPUT
23+
exit 0
24+
elif [ -f "${{ github.workspace }}/package.json" ]; then
25+
echo "manager=npm" >> $GITHUB_OUTPUT
26+
echo "command=ci" >> $GITHUB_OUTPUT
27+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
28+
exit 0
29+
else
30+
echo "Unable to determine package manager"
31+
exit 1
32+
fi
33+
- name: Setup Node
34+
uses: actions/setup-node@v3
35+
with:
36+
node-version: "22"
37+
cache: ${{ steps.detect-package-manager.outputs.manager }}
38+
- name: Restore cache
39+
uses: actions/cache@v3
40+
with:
41+
path: |
42+
.next/cache
43+
# Generate a new cache whenever packages or source files change.
44+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
45+
# If source files changed but packages didn't, rebuild from a prior cache.
46+
restore-keys: |
47+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
48+
- name: Install dependencies
49+
working-directory: react-ui
50+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
51+
- name: Build with Next.js
52+
working-directory: react-ui
53+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
54+
- name: Static HTML export with Next.js
55+
working-directory: react-ui
56+
run: ${{ steps.detect-package-manager.outputs.runner }} next export

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ safetensors
22
# safetensors==0.3.1 # Until they fix it
33
ffmpeg-python # Apache 2.0
44
# gradio==3.48.0
5-
gradio>=5.1.0 # MIT License
5+
gradio>=5.3.0 # MIT License
66
python-dotenv==1.0.0
77
soundfile==0.12.1; sys_platform == 'win32' # torchaudio
88
# sox # torchaudio for linux

server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ruff: noqa: E402
12
# %%
23
print("Starting server...\n")
34
import tts_webui.utils.setup_or_recover as setup_or_recover

tts_webui/bark/bark_tab.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import gradio as gr
66

77
from tts_webui.config.config import config
8-
from tts_webui.bark.clone.tab_voice_clone import tab_voice_clone
8+
# from tts_webui.bark.clone.tab_voice_clone import tab_voice_clone
99
from tts_webui.history_tab.voices_tab import voices_tab
1010
from tts_webui.bark.settings_tab_bark import settings_tab_bark
1111

tts_webui/config/load_config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"inbrowser": True,
1717
"share": False,
1818
"debug": False,
19-
"enable_queue": True,
2019
"max_threads": 40,
2120
"auth": None,
2221
"auth_message": None,
@@ -35,7 +34,6 @@
3534
"ssl_verify": True,
3635
"quiet": True,
3736
"show_api": True,
38-
"file_directories": None,
3937
"_frontend": True,
4038
},
4139
"extensions": {

0 commit comments

Comments
 (0)