Skip to content

Commit 9de5186

Browse files
authored
fix(testing): run IT tests cleanup only when needed (#37)
* fix(testing): run IT tests cleanup only when needed * remove extra newlines
1 parent 75b3108 commit 9de5186

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

.github/workflows/deploy-cloudrun-credentials-it.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: deploy-cloudrun Credentials Integration
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- 'main'
77
pull_request:
88

@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
service_account_key: ${{ secrets.DEPLOY_CLOUDRUN_SA_KEY_B64 }}
2929
export_default_credentials: true
30-
30+
3131
- id: deploy
3232
uses: ./
3333
with:
@@ -105,7 +105,7 @@ jobs:
105105

106106
cleanup:
107107
name: Clean Up
108-
if: ${{ always() }}
108+
if: ${{ (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name) && always() }}
109109
runs-on: ubuntu-latest
110110
needs: [json, gcloud, b64_json]
111111
steps:

.github/workflows/deploy-cloudrun-it.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: deploy-cloudrun Integration
22

33
on:
44
push:
5-
branches:
5+
branches:
66
- 'main'
77
pull_request:
88

@@ -113,7 +113,7 @@ jobs:
113113
run: |-
114114
npm install
115115
npm run build
116-
116+
117117
- run: |-
118118
sed -i "s/run-full-yaml/${{ steps.service.outputs.service }}/" ./tests/unit/service.full.yaml
119119
@@ -193,7 +193,7 @@ jobs:
193193
env:
194194
URL: ${{ steps.deploy_1.outputs.url }}
195195
REVISION: ${{ steps.service.outputs.service }}-001
196-
196+
197197
- run: |-
198198
sed -i "s/-001/-002/" ./tests/unit/service.namedrevision.yaml
199199
@@ -211,7 +211,7 @@ jobs:
211211
SERVICE: ${{ steps.service.outputs.service }}
212212
REVISION: ${{ steps.service.outputs.service }}-002
213213
COUNT: 2
214-
214+
215215
name:
216216
name: with Bad Inputs
217217
if: ${{ github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name }}
@@ -305,7 +305,7 @@ jobs:
305305
306306
cleanup:
307307
name: Clean Up
308-
if: ${{ always() }}
308+
if: ${{ (github.event_name == 'push' || github.repository == github.event.pull_request.head.repo.full_name) && always() }}
309309
runs-on: ubuntu-latest
310310
needs: [envvars, metadata, yaml, revision, name]
311311
steps:

0 commit comments

Comments
 (0)