Skip to content

Commit 8ad8940

Browse files
committed
ci update
1 parent 7fe88c6 commit 8ad8940

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/stackql.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,34 @@ jobs:
4040
--var GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }} \
4141
--output text -H --dryrun
4242
43+
- name: initial check for instances using stackql-assert
44+
id: check_instances_initial
45+
uses: stackql/[email protected]
46+
with:
47+
test_query_file_path: './stackql/scripts/check-instances/check-instances.iql'
48+
data_file_path: './stackql/data/vars.jsonnet'
49+
vars: GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }}
50+
expected_rows: 4
51+
continue-on-error: true
52+
4353
- name: deploy instances using stackql-exec
54+
if: steps.check_instances_initial.outcome == 'failure' # Run if the initial check failed
55+
id: deploy_instances
4456
uses: stackql/[email protected]
4557
with:
4658
query_file_path: './stackql/scripts/deploy-instances/deploy-instances.iql'
4759
data_file_path: './stackql/data/vars.jsonnet'
4860
vars: GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }}
4961

5062
- name: check if we have 4 instances using stackql-assert
63+
if: steps.check_instances_initial.outcome == 'failure' && steps.deploy_instances.outcome == 'success'
5164
uses: stackql/[email protected]
5265
with:
5366
test_query_file_path: './stackql/scripts/check-instances/check-instances.iql'
5467
data_file_path: './stackql/data/vars.jsonnet'
55-
vars: GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }}
68+
vars: GOOGLE_PROJECT=${{ env.GOOGLE_PROJECT }},GOOGLE_ZONE=${{ env.GOOGLE_ZONE }}
5669
expected_rows: 4
57-
70+
5871
- name: stop running instances using stackql-exec
5972
uses: stackql/[email protected]
6073
with:

0 commit comments

Comments
 (0)