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

View File

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