edge-camera CI on branch >> 140/merge << #33
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: CI edge-camera | |
| run-name: edge-camera CI on branch >> ${{ github.ref_name }} << | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - "edge/camera/**" | |
| jobs: | |
| lint_and_test_on_edge_camera: | |
| name: Run Python linter and unit tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: make install | |
| working-directory: ./edge/camera | |
| - name: Lint with ruff | |
| run: make check | |
| working-directory: ./edge/camera | |
| - name: Run unit tests | |
| run: make unit_tests | |
| working-directory: ./edge/camera | |
| - name: Upload unit test report | |
| uses: dorny/test-reporter@v1 | |
| if: ${{ always() }} | |
| with: | |
| name: Unit tests report in Python ${{ matrix.python-version }} | |
| path: edge/camera/reports/pytest/unit-tests-report.xml | |
| reporter: java-junit | |
| build_and_push_images: | |
| needs: lint_and_test_on_edge_camera | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - dockerfile: ./edge/camera/Dockerfile | |
| image: ghcr.io/${{ github.repository }}/edge_camera | |
| context: ./edge/camera | |
| uses: ./.github/workflows/template_build_and_push_docker_images.yml | |
| with: | |
| context: ${{ matrix.context }} | |
| dockerfile: ${{ matrix.dockerfile }} | |
| image: ${{ matrix.image }} | |
| secrets: | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} |