mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
dc44a6c3b4
* Make main frigate build non rpi specific and build rpi using base image * Add boards to sidebar * Fix docker build * Fix docs build * Update pr branch for testing * remove target from rpi build * Remove manual build * Add push build for rpi * fix typos, improve wording * Add arm build for rpi * Cleanup and add default github ref name * Cleanup docker build file system * Setup to use docker bake * Add ci/cd for bake * Fix path * Fix devcontainer * Set targets * Fix build * Fix syntax * Add wheels target * Move dev container to trt * Update key and fix rpi local * Move requirements files and set intermediate targets * Add back --load * Update docs for community board development * Update installation docs to reflect different builds available * Update docs with official and community supported headers * Update codeowners docs * Update docs * Assemble main and standard builds * Change order of pushes * Remove community board after successful build * Fix rpi bake file names
109 lines
3.2 KiB
YAML
109 lines
3.2 KiB
YAML
name: On pull request
|
|
|
|
on: pull_request
|
|
|
|
env:
|
|
DEFAULT_PYTHON: 3.9
|
|
|
|
jobs:
|
|
build_devcontainer:
|
|
runs-on: ubuntu-latest
|
|
name: Build Devcontainer
|
|
# The Dockerfile contains features that requires buildkit, and since the
|
|
# devcontainer cli uses docker-compose to build the image, the only way to
|
|
# ensure docker-compose uses buildkit is to explicitly enable it.
|
|
env:
|
|
DOCKER_BUILDKIT: "1"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 16.x
|
|
- name: Install devcontainer cli
|
|
run: npm install --global @devcontainers/cli
|
|
- name: Build devcontainer
|
|
run: devcontainer build --workspace-folder .
|
|
# It would be nice to also test the following commands, but for some
|
|
# reason they don't work even though in VS Code devcontainer works.
|
|
# - name: Start devcontainer
|
|
# run: devcontainer up --workspace-folder .
|
|
# - name: Run devcontainer scripts
|
|
# run: devcontainer run-user-commands --workspace-folder .
|
|
|
|
web_lint:
|
|
name: Web - Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 16.x
|
|
- run: npm install
|
|
working-directory: ./web
|
|
- name: Lint
|
|
run: npm run lint
|
|
working-directory: ./web
|
|
|
|
web_test:
|
|
name: Web - Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 16.x
|
|
- run: npm install
|
|
working-directory: ./web
|
|
- name: Test
|
|
run: npm run test
|
|
working-directory: ./web
|
|
|
|
python_checks:
|
|
runs-on: ubuntu-latest
|
|
name: Python Checks
|
|
steps:
|
|
- name: Check out the repository
|
|
uses: actions/checkout@v3
|
|
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
|
|
uses: actions/setup-python@v4.6.1
|
|
with:
|
|
python-version: ${{ env.DEFAULT_PYTHON }}
|
|
- name: Install requirements
|
|
run: |
|
|
python3 -m pip install -U pip
|
|
python3 -m pip install -r docker/main/requirements-dev.txt
|
|
- name: Check black
|
|
run: |
|
|
black --check --diff frigate migrations docker *.py
|
|
- name: Check isort
|
|
run: |
|
|
isort --check --diff frigate migrations docker *.py
|
|
- name: Check ruff
|
|
run: |
|
|
ruff check frigate migrations docker *.py
|
|
|
|
python_tests:
|
|
runs-on: ubuntu-latest
|
|
name: Python Tests
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
- uses: actions/setup-node@master
|
|
with:
|
|
node-version: 16.x
|
|
- run: npm install
|
|
working-directory: ./web
|
|
- name: Build web
|
|
run: npm run build
|
|
working-directory: ./web
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Build
|
|
run: make
|
|
- name: Run mypy
|
|
run: docker run --rm --entrypoint=python3 frigate:latest -u -m mypy --config-file frigate/mypy.ini frigate
|
|
- name: Run tests
|
|
run: docker run --rm --entrypoint=python3 frigate:latest -u -m unittest
|