From 6f75ac8f7d1966cd304dcd1f839b7f095479a125 Mon Sep 17 00:00:00 2001 From: kadirnar Date: Sat, 25 Nov 2023 13:18:14 +0300 Subject: [PATCH] Update CI workflow and package testing workflow --- .github/workflows/ci.yml | 33 ++++++------------------ .github/workflows/package_testing.yml | 36 ++++++++------------------- requirements.txt | 2 +- 3 files changed, 18 insertions(+), 53 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 690aaac..fad0e51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ -name: Python package CI - +name: Continuous Integration on: push: branches: [main] @@ -15,12 +14,11 @@ on: jobs: build: - runs-on: ${{ matrix.operating-system }} + runs-on: ubuntu-latest strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.8, 3.9, 3.10, 3.11] - torch-version: [2.1.0, 2.1.1] + python-version: ['3.10', '3.11'] fail-fast: false steps: @@ -59,28 +57,11 @@ jobs: - name: Update pip run: python -m pip install --upgrade pip + - name: Install local package with dev and readers dependencies + run: > + pip install -e .[dev] + - name: Check styling with pre-commit run: | pre-commit install pre-commit run --all-files - - - name: Install PyTorch on Linux and Windows - if: > - matrix.operating-system == 'ubuntu-latest' || - matrix.operating-system == 'windows-latest' - run: > - pip install torch==${{ matrix.torch-version }}+cpu - -f https://download.pytorch.org/whl/torch_stable.html - - - name: Install PyTorch on MacOS - if: matrix.operating-system == 'macos-latest' - run: pip install torch==${{ matrix.torch-version }} - - name: Install PyTorch on Linux and Windows - - - name: Install whisperplus package from local setup.py - run: > - pip install -e . - - - name: Unittest whisperplus - run: | - python -m unittest diff --git a/.github/workflows/package_testing.yml b/.github/workflows/package_testing.yml index ab1be93..1183ab6 100644 --- a/.github/workflows/package_testing.yml +++ b/.github/workflows/package_testing.yml @@ -1,20 +1,20 @@ -name: Package Testing +name: Package CI on: push: - branches: [ master ] + branches: [main] + pull_request: - branches: [ master ] + branches: [main] jobs: build: - runs-on: ${{ matrix.operating-system }} + runs-on: ubuntu-latest strategy: matrix: operating-system: [ubuntu-latest, windows-latest, macos-latest] - python-version: [3.8, 3.9, 3.10, 3.11, 3.12] - torch-version: [2.1.0, 2.1.1] + python-version: ['3.10', '3.11'] fail-fast: false steps: @@ -53,27 +53,11 @@ jobs: - name: Update pip run: python -m pip install --upgrade pip + - name: Install local package with dev and readers dependencies + run: > + pip install -e .[dev] + - name: Check styling with pre-commit run: | pre-commit install pre-commit run --all-files - - - name: Install PyTorch on Linux and Windows - if: > - matrix.operating-system == 'ubuntu-latest' || - matrix.operating-system == 'windows-latest' - run: > - pip install torch==${{ matrix.torch-version }}+cpu - -f https://download.pytorch.org/whl/torch_stable.html - - - name: Install PyTorch on MacOS - if: matrix.operating-system == 'macos-latest' - run: pip install torch==${{ matrix.torch-version }} - - - name: Install latest whisperplus package - run: > - pip install --upgrade --force-reinstall whisperplus - - - name: Unittest whisperplus - run: | - python -m unittest diff --git a/requirements.txt b/requirements.txt index f8bcace..efb2a54 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ gradio==4.7.1 moviepy==1.0.3 -numpy==1.26.2 +numpy pyannote.audio==3.1.0 pytube==15.0.0 Requests==2.31.0