diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 41adb07b2..5f59faea6 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -47,6 +47,7 @@ updates: - "/cluster_analytics" - "/controller/src/robot_vision" - "/mapping" + - "/tracker" schedule: interval: "monthly" commit-message: @@ -64,6 +65,7 @@ updates: - "/tests/compose/dlstreamer" - "/tests/perf_tests/compose" - "/tools/ppl_runner" + - "/tracker/test/service" schedule: interval: "monthly" commit-message: @@ -87,6 +89,7 @@ updates: - "/cluster_analytics" - "/mapping" - "/mapping/tests" + - "/tracker/test/service" schedule: interval: "monthly" commit-message: diff --git a/.github/workflows/tracker-service.yaml b/.github/workflows/tracker-service.yaml index cf8aea0bf..d49952fc3 100644 --- a/.github/workflows/tracker-service.yaml +++ b/.github/workflows/tracker-service.yaml @@ -11,15 +11,9 @@ on: # yamllint disable-line rule:truthy - main - release-* - tracker-service-* - paths: - - "tracker/**" - - ".github/workflows/tracker-service.yaml" push: branches: - main - paths: - - "tracker/**" - - ".github/workflows/tracker-service.yaml" workflow_dispatch: {} concurrency: @@ -30,8 +24,33 @@ permissions: contents: read jobs: + detect-changes: + name: "Detect Tracker Changes" + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + run-jobs: ${{ steps.changes.outputs.tracker }} + steps: + - name: "Checkout code" + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + fetch-depth: 0 # Fetch all history for accurate diff + + - name: "Detect tracker changes" + id: changes + uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 + with: + filters: | + tracker: + - 'tracker/**' + - '.github/workflows/tracker-service.yaml' + lint-cpp-code: name: "Lint C++ code" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code" @@ -49,6 +68,8 @@ jobs: lint-dockerfile: name: "Lint Dockerfile" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code" @@ -66,6 +87,8 @@ jobs: lint-python: name: "Lint Python code" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code" @@ -81,6 +104,8 @@ jobs: trivy-scan: name: "Trivy security scan (optional)" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code" @@ -101,6 +126,8 @@ jobs: native-build-and-test: name: "Native build and unit tests" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code" @@ -176,6 +203,8 @@ jobs: docker-build-and-test: name: "Docker build and service tests" + needs: detect-changes + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.run-jobs == 'true' }} runs-on: ubuntu-latest steps: - name: "Checkout code"