From bcb8c65b4c03556697430fa17bc21651186590e6 Mon Sep 17 00:00:00 2001 From: Politrees <143968312+Bebra777228@users.noreply.github.com> Date: Tue, 19 Nov 2024 16:59:17 +0500 Subject: [PATCH] workflows update --- .github/workflows/code_formatter.yml | 36 +++++++++++++++++----------- .github/workflows/code_linter.yml | 21 +++++++++++----- .github/workflows/test_cli.yml | 30 +++++++++++------------ .github/workflows/test_links.yml | 12 +++++----- 4 files changed, 58 insertions(+), 41 deletions(-) diff --git a/.github/workflows/code_formatter.yml b/.github/workflows/code_formatter.yml index 3b67176..546bd9d 100644 --- a/.github/workflows/code_formatter.yml +++ b/.github/workflows/code_formatter.yml @@ -1,4 +1,4 @@ -name: Форматировщик кода +name: Code Formatter on: push: @@ -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 @@ -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 \ No newline at end of file diff --git a/.github/workflows/code_linter.yml b/.github/workflows/code_linter.yml index 251bb2d..d9c51a6 100644 --- a/.github/workflows/code_linter.yml +++ b/.github/workflows/code_linter.yml @@ -1,4 +1,4 @@ -name: Линтер кода +name: Code Linter on: push: @@ -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 \ No newline at end of file diff --git a/.github/workflows/test_cli.yml b/.github/workflows/test_cli.yml index a4a327c..a7ae981 100644 --- a/.github/workflows/test_cli.yml +++ b/.github/workflows/test_cli.yml @@ -1,4 +1,4 @@ -name: Тест CLI скриптов +name: CLI Script Test on: push: @@ -13,32 +13,32 @@ 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" @@ -46,26 +46,26 @@ 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: Запуск скрипта 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" \ No newline at end of file diff --git a/.github/workflows/test_links.yml b/.github/workflows/test_links.yml index b723deb..03df214 100644 --- a/.github/workflows/test_links.yml +++ b/.github/workflows/test_links.yml @@ -1,4 +1,4 @@ -name: Тест ссылок +name: Link Test on: push: @@ -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 @@ -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" \ No newline at end of file