File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,16 @@ jobs:
2020 ref : ${{ github.head_ref }}
2121 fetch-depth : 0
2222
23+ # Only run Google Cloud authentication and integration tests for pushes to main
2324 - name : Authenticate to Google Cloud
24- if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
25+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
2526 uses : google-github-actions/auth@v1
2627 with :
2728 workload_identity_provider : ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
2829 service_account : ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
2930
3031 - name : Set up gcloud (for KMS client lib to auth)
31- if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
32+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
3233 uses : google-github-actions/setup-gcloud@v1
3334 with :
3435 project_id : courtyard-frontend
5253 - name : Run unit tests
5354 run : go test -v -timeout 120s ./... -short
5455
56+ # Only run integration tests for pushes to main
5557 - name : Run integration tests
58+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
5659 env :
5760 GOOGLE_CLOUD_PROJECT : courtyard-frontend
5861 TEST_KMS_KEY_NAME : ${{ secrets.KMS_KEY_NAME }}
You can’t perform that action at this time.
0 commit comments