99 - cron : ' 48 23 * * 0'
1010
1111jobs :
12- localstack-action-test :
13- name : ' Test LocalStack GitHub Action'
14- runs-on : ubuntu-latest
15- steps :
16- - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
17-
18- # We must hack the action call as remote to be able to use the relative paths
19- # Could it break with different CWD? 🤔
20- - name : Start LocalStack
21- uses : jenseng/dynamic-uses@8bc24f0360175e710da532c4d19eafdbed489a06 # v1
22- with :
23- uses : LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }}
24- with : |-
25- {
26- "image-tag": "latest",
27- "install-awslocal": "true",
28- "configuration": "DEBUG=1",
29- "use-pro": "true",
30- }
31- env :
32- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
33- GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
34-
35- - name : Run Tests Against LocalStack
36- run : |
37- awslocal s3 mb s3://test
38- awslocal s3 ls
39- echo "Test Execution complete!"
40-
4112 localstack-action-version-test :
4213 name : ' Test LocalStack Version with Github Actions'
4314 runs-on : ubuntu-latest
8758 "use-pro": "true",
8859 }
8960 env :
90- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
61+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
9162 GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
9263
9364 - name : Generate random pod name
@@ -109,12 +80,15 @@ jobs:
10980 "state-action": "save",
11081 }
11182 env :
112- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
83+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
11384 GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
11485
11586 - name : Verify Cloud Pod
11687 run : |
11788 localstack pod list | grep ${{ steps.pod_name.outputs.name }}
89+ env :
90+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
91+
11892
11993 load-cloud-pod-test :
12094 name : ' Test Loading Cloud Pod'
@@ -138,7 +112,7 @@ jobs:
138112 "state-action": "load"
139113 }
140114 env :
141- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
115+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
142116 GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
143117
144118 - name : Verify loaded resources
@@ -160,6 +134,9 @@ jobs:
160134 exit 1
161135 fi
162136 echo "Pod successfully deleted."
137+ env :
138+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
139+
163140
164141 local-state-save-test :
165142 name : ' Test Local State Save Action'
@@ -180,7 +157,7 @@ jobs:
180157 "use-pro": "true",
181158 }
182159 env :
183- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
160+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
184161 GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
185162
186163 - name : Run AWS commands
@@ -199,11 +176,12 @@ jobs:
199176 "state-backend": "local",
200177 }
201178 env :
202- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
179+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
203180 GH_ACTION_VERSION : ${{ (github.event_name == 'pull_request' && github.event.pull_request.head.sha) || github.ref_name }}
204181
205182 local-state-load-test :
206183 name : ' Test Local State Load Action'
184+ needs : local-state-save-test
207185 runs-on : ubuntu-latest
208186 steps :
209187 - name : ⚡️ Checkout the repository
@@ -224,7 +202,7 @@ jobs:
224202 "state-backend": "local",
225203 }
226204 env :
227- LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
205+ LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_API_KEY }}
228206 GH_ACTION_VERSION : ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
229207
230208 - name : Run AWS Commands
0 commit comments