mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
add lint check to workflow
This commit is contained in:
parent
ec91466fe4
commit
12abbc59d6
23
.github/workflows/pull_request.yml
vendored
23
.github/workflows/pull_request.yml
vendored
@ -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
|
||||||
|
@ -38,4 +38,4 @@ class TestYuvRegion2RGB(TestCase):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main(verbosity=2)
|
main(verbosity=2)
|
||||||
|
Loading…
Reference in New Issue
Block a user