[misc] Run management benchmark jobs on file changes (#3343)

They will always run on Main
This commit is contained in:
Maycon Santos 2025-02-18 10:45:41 +01:00 committed by GitHub
parent f67e56d3b9
commit bd381d59cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -13,10 +13,19 @@ concurrency:
jobs: jobs:
build-cache: build-cache:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
outputs:
management: ${{ steps.filter.outputs.management }}
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
management:
- 'management/**'
- name: Install Go - name: Install Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
@ -198,6 +207,7 @@ jobs:
benchmark: benchmark:
needs: [ build-cache ] needs: [ build-cache ]
if: ${{ needs.build-cache.outputs.management == 'true' || github.event_name != 'pull_request' }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -258,6 +268,7 @@ jobs:
api_benchmark: api_benchmark:
needs: [ build-cache ] needs: [ build-cache ]
if: ${{ needs.build-cache.outputs.management == 'true' || github.event_name != 'pull_request' }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -318,6 +329,7 @@ jobs:
api_integration_test: api_integration_test:
needs: [ build-cache ] needs: [ build-cache ]
if: ${{ needs.build-cache.outputs.management == 'true' || github.event_name != 'pull_request' }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:

View File

@ -111,4 +111,3 @@ Generate gRpc code:
#!/bin/bash #!/bin/bash
protoc -I proto/ proto/management.proto --go_out=. --go-grpc_out=. protoc -I proto/ proto/management.proto --go_out=. --go-grpc_out=.
``` ```