Misc backend performance improvements #15091
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: On pull request | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - ".github/*.yml" | |
| - ".github/DISCUSSION_TEMPLATE/**" | |
| - ".github/ISSUE_TEMPLATE/**" | |
| env: | |
| DEFAULT_PYTHON: 3.11 | |
| jobs: | |
| web_lint: | |
| name: Web - Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - run: npm install | |
| working-directory: ./web | |
| - name: Lint | |
| run: npm run lint | |
| working-directory: ./web | |
| - name: Check i18n keys | |
| run: npm run i18n:extract:ci | |
| working-directory: ./web | |
| web_test: | |
| name: Web - Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - run: npm install | |
| working-directory: ./web | |
| - name: Build web | |
| run: npm run build | |
| working-directory: ./web | |
| # - name: Test | |
| # run: npm run test | |
| # working-directory: ./web | |
| web_e2e: | |
| name: Web - E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - run: npm install | |
| working-directory: ./web | |
| - name: Install Playwright Chromium | |
| run: npx playwright install chromium --with-deps | |
| working-directory: ./web | |
| - name: Build web for E2E | |
| run: npm run e2e:build | |
| working-directory: ./web | |
| - name: Run E2E tests | |
| run: npm run e2e | |
| working-directory: ./web | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: | | |
| web/test-results/ | |
| web/playwright-report/ | |
| retention-days: 7 | |
| python_checks: | |
| runs-on: ubuntu-latest | |
| name: Python Checks | |
| steps: | |
| - name: Check out the repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python ${{ env.DEFAULT_PYTHON }} | |
| uses: actions/setup-python@v5.4.0 | |
| 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 formatting | |
| run: | | |
| ruff format --check --diff frigate migrations docker *.py | |
| - name: Check lint | |
| run: | | |
| ruff check frigate migrations docker *.py | |
| python_tests: | |
| runs-on: ubuntu-latest | |
| name: Python Tests | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20.x | |
| - name: Install devcontainer cli | |
| run: npm install --global @devcontainers/cli | |
| - name: Build devcontainer | |
| env: | |
| DOCKER_BUILDKIT: "1" | |
| run: devcontainer build --workspace-folder . | |
| - name: Start devcontainer | |
| run: devcontainer up --workspace-folder . | |
| - name: Run mypy in devcontainer | |
| run: devcontainer exec --workspace-folder . bash -lc "python3 -u -m mypy --config-file frigate/mypy.ini frigate" | |
| - name: Run unit tests in devcontainer | |
| run: devcontainer exec --workspace-folder . bash -lc "python3 -u -m unittest" |