Run python unit tests in a github actions (#2589)

* tox tests initial commit

* run tests in the Dockerfile during the build phase

* remove local tests

Co-authored-by: YS <ys@gm.com>
This commit is contained in:
Yuriy Sannikov
2022-01-14 16:31:25 +03:00
committed by Blake Blackshear
parent 80627e4989
commit 6eecb6780e
6 changed files with 43 additions and 8 deletions

View File

@@ -537,6 +537,8 @@ class CameraConfig(FrigateBaseModel):
return self._ffmpeg_cmds
def create_ffmpeg_cmds(self):
if "_ffmpeg_cmds" in self:
return
ffmpeg_cmds = []
for ffmpeg_input in self.ffmpeg.inputs:
ffmpeg_cmd = self._get_ffmpeg_cmd(ffmpeg_input)
@@ -845,7 +847,8 @@ class FrigateConfig(FrigateBaseModel):
logger.warning(
f"Recording retention is configured for {camera_config.record.retain.mode} and event retention is configured for {camera_config.record.events.retain.mode}. The more restrictive retention policy will be applied."
)
# generage the ffmpeg commands
camera_config.create_ffmpeg_cmds()
config.cameras[name] = camera_config
return config