Skip to content

update deps

update deps #811

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
node: ${{ steps.select.outputs.node }}
python: ${{ steps.select.outputs.python }}
go: ${{ steps.select.outputs.go }}
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
shared-node:
- 'externals/**'
- '!externals/reolinkproxy'
- '!externals/reolinkproxy/**'
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
- 'scripts/**'
- '.github/workflows/ci.yml'
- '.github/scripts/select-plugins.mjs'
- '.github/scripts/plugins.mjs'
shared-python:
- '.github/workflows/ci.yml'
- '.github/scripts/select-plugins.mjs'
- '.github/scripts/plugins.mjs'
shared-go:
- '.github/workflows/ci.yml'
- '.github/scripts/select-plugins.mjs'
- '.github/scripts/plugins.mjs'
camera-ui-homeassistant: ['camera-ui-homeassistant/**']
camera-ui-homekit: ['camera-ui-homekit/**']
camera-ui-onvif: ['camera-ui-onvif/**']
camera-ui-ring: ['camera-ui-ring/**']
camera-ui-pamdiff: ['camera-ui-pamdiff/**']
camera-ui-rust-motion: ['camera-ui-rust-motion/**']
camera-ui-smtp: ['camera-ui-smtp/**']
camera-ui-tuya: ['camera-ui-tuya/**']
camera-ui-wasm-motion: ['camera-ui-wasm-motion/**']
camera-ui-audio-yamnet: ['camera-ui-audio-yamnet/**']
camera-ui-coral: ['camera-ui-coral/**']
camera-ui-coreml: ['camera-ui-coreml/**']
camera-ui-hailo: ['camera-ui-hailo/**']
camera-ui-ncnn: ['camera-ui-ncnn/**']
camera-ui-onnx: ['camera-ui-onnx/**']
camera-ui-onnx-legacy: ['camera-ui-onnx-legacy/**', 'camera-ui-onnx/src/**', 'camera-ui-onnx/contract.ts']
camera-ui-eufy: ['camera-ui-eufy/**']
camera-ui-opencl: ['camera-ui-opencl/**']
camera-ui-opencv: ['camera-ui-opencv/**']
camera-ui-openvino: ['camera-ui-openvino/**']
camera-ui-openvino-legacy: ['camera-ui-openvino-legacy/**', 'camera-ui-openvino/src/**', 'camera-ui-openvino/contract.ts']
camera-ui-wyze: ['camera-ui-wyze/**']
camera-ui-reolink: ['camera-ui-reolink/**', 'externals/reolinkproxy', 'externals/reolinkproxy/**']
- id: select
env:
CHANGED: ${{ steps.filter.outputs.changes }}
run: node .github/scripts/select-plugins.mjs
node-plugins:
needs: changes
if: needs.changes.outputs.node != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.changes.outputs.node) }}
steps:
- uses: actions/checkout@v7
- name: Init submodules
if: matrix.externals != ''
run: git submodule update --init --depth 1 ${{ matrix.externals }}
- uses: actions/setup-node@v7
with:
node-version: "22"
- name: Install
run: npm --prefix ${{ matrix.plugin }} install --ignore-scripts
- name: Build
run: npm --prefix ${{ matrix.plugin }} run build
- name: Lint
run: npm --prefix ${{ matrix.plugin }} run lint
go-plugins:
needs: changes
if: needs.changes.outputs.go != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.changes.outputs.go) }}
steps:
- uses: actions/checkout@v7
- name: Init submodules
if: matrix.externals != ''
run: git submodule update --init --depth 1 ${{ matrix.externals }}
- uses: actions/setup-node@v7
with:
node-version: "22"
- uses: actions/setup-go@v7
with:
go-version-file: ${{ matrix.plugin }}/go.mod
cache-dependency-path: ${{ matrix.plugin }}/go.sum
- name: Install
run: npm --prefix ${{ matrix.plugin }} install --ignore-scripts
- name: Build
run: npm --prefix ${{ matrix.plugin }} run build
- name: Install Go lint tools
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Lint
run: npm --prefix ${{ matrix.plugin }} run lint
- name: Test
run: npm --prefix ${{ matrix.plugin }} test
python-plugins:
needs: changes
if: needs.changes.outputs.python != '[]'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.changes.outputs.python) }}
steps:
- uses: actions/checkout@v7
- name: Sync sources from base plugin
run: |
if [ -f "${{ matrix.plugin }}/scripts/sync.mjs" ]; then
node "${{ matrix.plugin }}/scripts/sync.mjs"
fi
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
- name: Install deps (lint/type tools + plugin requirements)
run: pip install ruff mypy -r ${{ matrix.plugin }}/requirements.txt
- name: Format (ruff)
run: cd ${{ matrix.plugin }} && ruff format
- name: Lint (ruff)
run: cd ${{ matrix.plugin }} && ruff check
- name: Type-check (mypy)
run: cd ${{ matrix.plugin }} && mypy src