diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 0000000..4afd0a1 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,34 @@ +name: Code Quality + +on: + pull_request: + branches: + - "*" + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10"] + steps: + - uses: actions/checkout@master + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + - name: Install PortAudio to install PyAudio + run: | + sudo apt-get update + sudo apt-get install python3-pyaudio portaudio19-dev python3-dev + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt -r requirements-dev.txt + - name: Run pre-commit + run: | + pre-commit run --all-files --show-diff-on-failure diff --git a/README.md b/README.md index 2a55242..37fd264 100644 --- a/README.md +++ b/README.md @@ -959,6 +959,7 @@ If you are using an API key that was created before you funded your account for - [x] Add `appearance_mode` to `config.ini`. - [x] Add support for **Whisper's API** ([#42](https://github.com/HenestrosaDev/audiotext/discussions/42)). - [x] Add pre-commit configuration for using `ruff` and `mypy`. +- [x] Set up a CI pipeline to apply the pre-commit hooks. - [ ] Change the `Generate transcription` button to `Cancel transcription` when a transcription is in progress. - [ ] Generate executables for macOS and Linux. - [ ] Add tests. diff --git a/requirements.txt b/requirements.txt index df2a017..37fd2f2 100644 Binary files a/requirements.txt and b/requirements.txt differ