edge_camera CI on branch >> main << #16
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.9", "3.10", "3.11"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: make install | |
| working-directory: ./edge/camera | |
| - name: Lint with flake8 and black | |
| 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 |