add lint check to workflow

This commit is contained in:
Blake Blackshear 2022-04-16 08:43:26 -05:00
parent ec91466fe4
commit 12abbc59d6
2 changed files with 23 additions and 2 deletions

View File

@ -2,6 +2,9 @@ name: On pull request
on: pull_request on: pull_request
env:
DEFAULT_PYTHON: 3.9
jobs: jobs:
web_lint: web_lint:
name: Web - Lint name: Web - Lint
@ -45,6 +48,24 @@ jobs:
run: npm run test run: npm run test
working-directory: ./web working-directory: ./web
python_checks:
runs-on: ubuntu-latest
name: Python checks
steps:
- name: Check out the repository
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install requirements
run: |
pip install pip
pip install -r requirements-dev.txt
- name: Lint
run: |
python3 -m black frigate --check
python_tests: python_tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -59,4 +80,4 @@ jobs:
- name: Run mypy - name: Run mypy
run: docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate run: docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate
- name: Run tests - name: Run tests
run: docker run --rm --entrypoint=python3 frigate:latest -u -m unittest run: docker run --rm --entrypoint=python3 frigate:latest -u -m unittest

View File

@ -38,4 +38,4 @@ class TestYuvRegion2RGB(TestCase):
if __name__ == "__main__": if __name__ == "__main__":
main(verbosity=2) main(verbosity=2)