From 96533b19731961f7371643c083ef7d2df740bec1 Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Thu, 2 Oct 2025 17:30:41 +0100 Subject: [PATCH 1/3] Checks were missing from setup - no change needed to config --- .github/workflows/dotnet-build-and-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index c47807b31a..79d757e3a0 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -115,7 +115,7 @@ jobs: run: echo "github.event_name:${{ github.event_name }} matrix.integration-tests:${{ matrix.integration-tests }} github.event.action:${{ github.event.action }} github.event.pull_request.merged:${{ github.event.pull_request.merged }}" - name: Azure CLI Login - if: (github.event_name == 'merge_group' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && matrix.integration-tests + if: github.event_name != 'pull_request' && matrix.integration-tests uses: azure/login@v2 with: client-id: ${{ secrets.AZURE_CLIENT_ID }} @@ -124,7 +124,7 @@ jobs: - name: Run Integration Tests shell: bash - if: (github.event_name == 'merge_group' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && matrix.integration-tests + if: github.event_name != 'pull_request' && matrix.integration-tests run: | export INTEGRATION_TEST_PROJECTS=$(find ./dotnet -type f -name "*IntegrationTests.csproj" | tr '\n' ' ') for project in $INTEGRATION_TEST_PROJECTS; do From b6326f8f7353b1f045e29f739f2be5a227598c3a Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Thu, 2 Oct 2025 19:16:55 +0100 Subject: [PATCH 2/3] Changing path filtering logic for dotnet tests --- .github/workflows/dotnet-build-and-test.yml | 36 ++++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 79d757e3a0..9ef6ac5483 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -8,17 +8,11 @@ name: dotnet-build-and-test on: workflow_dispatch: pull_request: - branches: ["main", "feature*"] - paths: - - dotnet/** - - '.github/workflows/dotnet-build-and-test.yml' + branches: ["main"] merge_group: branches: ["main"] push: - branches: ["main", "feature*"] - paths: - - dotnet/** - - '.github/workflows/dotnet-build-and-test.yml' + branches: ["main"] schedule: - cron: "0 0 * * *" # Run at midnight UTC daily @@ -34,7 +28,33 @@ permissions: id-token: "write" jobs: + paths-filter: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + outputs: + dotnetChanges: ${{ steps.filter.outputs.python}} + steps: + - uses: actions/checkout@v5 + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + dotnet: + - 'dotnet/**' + # run only if 'dotnet' files were changed + - name: dotnet tests + if: steps.filter.outputs.dotnet == 'true' + run: echo "Dotnet file" + # run only if not 'dotnet' files were changed + - name: not dotnet tests + if: steps.filter.outputs.dotnet != 'true' + run: echo "NOT dotnet file" + dotnet-build-and-test: + needs: paths-filter + if: needs.paths-filter.outputs.dotnetChanges == 'true' strategy: fail-fast: false matrix: From e998945c0f763c505c6c0ebe25a2f58826e9eaed Mon Sep 17 00:00:00 2001 From: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com> Date: Thu, 2 Oct 2025 19:20:21 +0100 Subject: [PATCH 3/3] Update .github/workflows/dotnet-build-and-test.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/dotnet-build-and-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 9ef6ac5483..073177d483 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -34,7 +34,7 @@ jobs: contents: read pull-requests: read outputs: - dotnetChanges: ${{ steps.filter.outputs.python}} + dotnetChanges: ${{ steps.filter.outputs.dotnet}} steps: - uses: actions/checkout@v5 - uses: dorny/paths-filter@v3