Skip to content

Commit

Permalink
workflows update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bebra777228 committed Nov 19, 2024
1 parent d2d929a commit bcb8c65
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 41 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/code_formatter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Форматировщик кода
name: Code Formatter

on:
push:
Expand All @@ -14,23 +14,31 @@ jobs:
pull-requests: write

steps:
- name: Проверка кода
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Настройка Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Установка Black
run: pip install black
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black isort autoflake
- name: Run autoflake
run: autoflake --in-place --recursive .

- name: Run isort
run: isort .

- name: Запуск Black
- name: Run Black
run: black .

- name: Проверка наличия изменений
- name: Check for changes
id: changes
run: |
if [ -n "$(git status --porcelain)" ]; then
Expand All @@ -39,20 +47,20 @@ jobs:
echo "::set-output name=has_changes::false"
fi
- name: Фиксация изменений
- name: Commit changes
if: steps.changes.outputs.has_changes == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add --all
git commit -m "Автоматическое форматирование кода с помощью black"
git commit -m "Automatic code formatting."
- name: Создание Pull Request
- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
delete-branch: true
body: "Автоматическое форматирование кода с помощью black"
title: "Автоматическое форматирование кода"
commit-message: "Автоматическое форматирование кода с помощью black"
branch: formatter/PolGen
body: "Automatic code formatting."
title: "Automatic code formatting."
commit-message: "Automatic code formatting."
branch: formatter/PolGen
21 changes: 15 additions & 6 deletions .github/workflows/code_linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Линтер кода
name: Code Linter

on:
push:
Expand All @@ -13,20 +13,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Проверка кода
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- name: Настройка Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Установка flake8
- name: Install dependencies
run: |
pip install flake8
python -m pip install --upgrade pip
pip install flake8 pylint vulture
- name: Запуск flake8
- name: Run flake8
run: flake8 .
continue-on-error: true

- name: Run PyLint
run: pylint .
continue-on-error: true

- name: Run Vulture
run: vulture .
continue-on-error: true
30 changes: 15 additions & 15 deletions .github/workflows/test_cli.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Тест CLI скриптов
name: CLI Script Test

on:
push:
Expand All @@ -13,59 +13,59 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Проверка кода
- name: Checkout code
uses: actions/checkout@v4

- name: Настройка Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Установка зависимостей
- name: Install dependencies
run: |
pip install --upgrade pip==24.0
pip install --no-cache-dir --upgrade pip==24.0
pip install --no-cache-dir -r requirements.txt
pip uninstall torch torchvision torchaudio -y
pip install --no-cache-dir torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
- name: Установка необходимых моделей
- name: Install necessary models
run: |
python download_models.py
python3 -m rvc.modules.model_manager "https://huggingface.co/Politrees/Victor_Tsoi/resolve/main/Victor_Tsoi.zip?download=true" "Tsoi"
- name: Установка аудио для теста
- name: Install audio for testing
run: |
mkdir -p audio
wget https://huggingface.co/Politrees/audio_for_test/resolve/main/BritishEnglishUKTest5.mp3 -O audio/test.mp3
- name: Запуск скрипта rvc_cli
- name: Run rvc_cli script
run: |
python3 -m rvc.cli.rvc_cli -i audio/test.mp3 -m Tsoi -p -0.5 -ir 0 -fr 3 -rms 0.25 -f0 "rmvpe+" -hop 32 -pro 0.33 -f0min 1 -f0max 1100 -f "mp3"
tts_cli:
runs-on: ubuntu-latest

steps:
- name: Проверка кода
- name: Checkout code
uses: actions/checkout@v4

- name: Настройка Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Установка зависимостей
- name: Install dependencies
run: |
pip install --upgrade pip==24.0
pip install --no-cache-dir --upgrade pip==24.0
pip install --no-cache-dir -r requirements.txt
pip uninstall torch torchvision torchaudio -y
pip install --no-cache-dir torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
- name: Установка необходимых моделей
- name: Install necessary models
run: |
python download_models.py
python3 -m rvc.modules.model_manager "https://huggingface.co/Politrees/Victor_Tsoi/resolve/main/Victor_Tsoi.zip?download=true" "Tsoi"
- name: Запуск скрипта tts_cli
- name: Run tts_cli script
run: |
python3 -m rvc.cli.edge_tts_cli -i "e" -m Tsoi -v "en-US-GuyNeural" -p -0.5 -ir 0 -fr 3 -rms 0.25 -f0 "rmvpe+" -hop 32 -pro 0.33 -f0min 1 -f0max 1100 -f "mp3"
python3 -m rvc.cli.edge_tts_cli -i "e" -m Tsoi -v "en-US-GuyNeural" -p -0.5 -ir 0 -fr 3 -rms 0.25 -f0 "rmvpe+" -hop 32 -pro 0.33 -f0min 1 -f0max 1100 -f "mp3"
12 changes: 6 additions & 6 deletions .github/workflows/test_links.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Тест ссылок
name: Link Test

on:
push:
Expand All @@ -21,15 +21,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Проверка кода
- name: Checkout code
uses: actions/checkout@v4

- name: Настройка Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Установка зависимостей
- name: Install dependencies
run: |
pip install --upgrade pip==23.1
pip install requests gdown mega.py gradio
Expand All @@ -50,6 +50,6 @@ jobs:
run: |
python3 -m rvc.modules.model_manager "https://mega.nz/file/vgMBFB5I#-ZUtYEvV-OImhRjs9b1UpFyE2lm-BuEbODD3N9b3sg4" "test4"
- name: Яндекс Диск
- name: Yandex Disk
run: |
python3 -m rvc.modules.model_manager "https://disk.yandex.ru/d/njvq8NEQgS2OhQ" "test5"
python3 -m rvc.modules.model_manager "https://disk.yandex.ru/d/njvq8NEQgS2OhQ" "test5"

0 comments on commit bcb8c65

Please sign in to comment.