From c3b331569d370dcd631d2d138490dce19fb045ec Mon Sep 17 00:00:00 2001 From: nikkie Date: Tue, 2 Apr 2024 10:12:35 +0000 Subject: [PATCH] [chore] Run flake8 for each pull request --- .github/workflows/lint.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..34584c23 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,26 @@ +name: Static analysis + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + flake8: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install flake8 + - name: Run flake8 + run: | + # ignore errors for long lines and multi-statement lines + python -m flake8 --ignore=E501,E701,W503 speech_recognition tests examples setup.py