@@ -123,3 +123,205 @@ jobs:
123
123
run : make install
124
124
- name : Lint typescript files
125
125
run : make lint
126
+ test-infra-setup :
127
+ strategy :
128
+ fail-fast : false
129
+ matrix :
130
+ platform : [ubuntu-latest]
131
+ go-version : [1.13.x]
132
+ node-version : [10.x]
133
+ python-version : [3.7]
134
+ dotnet-version : ['3.1.100']
135
+ runs-on : ${{ matrix.platform }}
136
+ steps :
137
+ - name : Install DotNet ${{ matrix.dotnet-version }}
138
+ uses : actions/setup-dotnet@v1
139
+ with :
140
+ dotnet-version : ${{ matrix.dotnet-version }}
141
+ - name : Use Node.js ${{ matrix.node-version }}
142
+ uses : actions/setup-node@v1
143
+ with :
144
+ node-version : ${{ matrix.node-version }}
145
+ - name : Set up Go ${{ matrix.go-version }}
146
+ uses : actions/setup-go@v1
147
+ with :
148
+ go-version : ${{ matrix.go-version }}
149
+ - name : Set up Python ${{ matrix.python-version }}
150
+ uses : actions/setup-python@v1
151
+ with :
152
+ python-version : ${{ matrix.python-version }}
153
+ - name : Install Python Deps
154
+ run : |
155
+ pip3 install pipenv
156
+ - name : Install aws-iam-authenticator
157
+ run : |
158
+ curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator
159
+ chmod +x ./aws-iam-authenticator
160
+ sudo mv aws-iam-authenticator /usr/local/bin
161
+ - name : Install Kubectl
162
+ run : |
163
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
164
+ chmod +x ./kubectl
165
+ sudo mv kubectl /usr/local/bin
166
+ - uses : GoogleCloudPlatform/github-actions/setup-gcloud@master
167
+ with :
168
+ version : ' 285.0.0'
169
+ project_id : ${{ secrets.GCP_PROJECT_ID }}
170
+ service_account_email : ${{ secrets.GCP_SA_EMAIL }}
171
+ service_account_key : ${{ secrets.GCP_SA_KEY }}
172
+ - name : Install helm
173
+ run : |
174
+ curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
175
+ - name : Configure helm
176
+ run : |
177
+ helm init -c
178
+ helm repo add bitnami https://charts.bitnami.com/bitnami
179
+ - name : Set Azure DNS
180
+ run : |
181
+ echo "$(getent hosts $ARM_LOCATION.management.azure.com | awk '{ print $1 }') management.azure.com" | sudo tee --append /etc/hosts
182
+ - name : Login to Google Cloud Registry
183
+ run : |
184
+ gcloud --quiet auth configure-docker
185
+ - name : Install Pulumi CLI
186
+ uses : pulumi/action-install-pulumi-cli@releases/v1
187
+ - uses : actions/checkout@v2
188
+ - name : Create test infra
189
+ run : |
190
+ make setup_test_infra StackName="${{ secrets.PULUMI_TEST_OWNER }}/${{ github.sha }}"
191
+ test-infra-destroy :
192
+ needs : kubernetes
193
+ strategy :
194
+ fail-fast : false
195
+ matrix :
196
+ platform : [ubuntu-latest]
197
+ go-version : [1.13.x]
198
+ node-version : [10.x]
199
+ python-version : [3.7]
200
+ dotnet-version : ['3.1.100']
201
+ runs-on : ${{ matrix.platform }}
202
+ steps :
203
+ - name : Install DotNet ${{ matrix.dotnet-version }}
204
+ uses : actions/setup-dotnet@v1
205
+ with :
206
+ dotnet-version : ${{ matrix.dotnet-version }}
207
+ - name : Use Node.js ${{ matrix.node-version }}
208
+ uses : actions/setup-node@v1
209
+ with :
210
+ node-version : ${{ matrix.node-version }}
211
+ - name : Set up Go ${{ matrix.go-version }}
212
+ uses : actions/setup-go@v1
213
+ with :
214
+ go-version : ${{ matrix.go-version }}
215
+ - name : Set up Python ${{ matrix.python-version }}
216
+ uses : actions/setup-python@v1
217
+ with :
218
+ python-version : ${{ matrix.python-version }}
219
+ - name : Install Python Deps
220
+ run : |
221
+ pip3 install pipenv
222
+ - name : Install aws-iam-authenticator
223
+ run : |
224
+ curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator
225
+ chmod +x ./aws-iam-authenticator
226
+ sudo mv aws-iam-authenticator /usr/local/bin
227
+ - name : Install Kubectl
228
+ run : |
229
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
230
+ chmod +x ./kubectl
231
+ sudo mv kubectl /usr/local/bin
232
+ - uses : GoogleCloudPlatform/github-actions/setup-gcloud@master
233
+ with :
234
+ version : ' 285.0.0'
235
+ project_id : ${{ secrets.GCP_PROJECT_ID }}
236
+ service_account_email : ${{ secrets.GCP_SA_EMAIL }}
237
+ service_account_key : ${{ secrets.GCP_SA_KEY }}
238
+ - name : Install helm
239
+ run : |
240
+ curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
241
+ - name : Configure helm
242
+ run : |
243
+ helm init -c
244
+ helm repo add bitnami https://charts.bitnami.com/bitnami
245
+ - name : Set Azure DNS
246
+ run : |
247
+ echo "$(getent hosts $ARM_LOCATION.management.azure.com | awk '{ print $1 }') management.azure.com" | sudo tee --append /etc/hosts
248
+ - name : Login to Google Cloud Registry
249
+ run : |
250
+ gcloud --quiet auth configure-docker
251
+ - name : Install Pulumi CLI
252
+ uses : pulumi/action-install-pulumi-cli@releases/v1
253
+ - uses : actions/checkout@v2
254
+ - name : Destroy test infra
255
+ run : |
256
+ make destroy_test_infra StackName="${{ secrets.PULUMI_TEST_OWNER }}/${{ github.sha }}"
257
+ kubernetes :
258
+ needs : test-infra-setup
259
+ strategy :
260
+ fail-fast : false
261
+ matrix :
262
+ platform : [ubuntu-latest]
263
+ go-version : [1.13.x]
264
+ node-version : [10.x]
265
+ python-version : [3.7]
266
+ dotnet-version : ['3.1.100']
267
+ runs-on : ${{ matrix.platform }}
268
+ steps :
269
+ - name : Install DotNet ${{ matrix.dotnet-version }}
270
+ uses : actions/setup-dotnet@v1
271
+ with :
272
+ dotnet-version : ${{ matrix.dotnet-version }}
273
+ - name : Use Node.js ${{ matrix.node-version }}
274
+ uses : actions/setup-node@v1
275
+ with :
276
+ node-version : ${{ matrix.node-version }}
277
+ - name : Set up Go ${{ matrix.go-version }}
278
+ uses : actions/setup-go@v1
279
+ with :
280
+ go-version : ${{ matrix.go-version }}
281
+ - name : Set up Python ${{ matrix.python-version }}
282
+ uses : actions/setup-python@v1
283
+ with :
284
+ python-version : ${{ matrix.python-version }}
285
+ - name : Install Python Deps
286
+ run : |
287
+ pip3 install pipenv
288
+ - name : Install aws-iam-authenticator
289
+ run : |
290
+ curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator
291
+ chmod +x ./aws-iam-authenticator
292
+ sudo mv aws-iam-authenticator /usr/local/bin
293
+ - name : Install Kubectl
294
+ run : |
295
+ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
296
+ chmod +x ./kubectl
297
+ sudo mv kubectl /usr/local/bin
298
+ - uses : GoogleCloudPlatform/github-actions/setup-gcloud@master
299
+ with :
300
+ version : ' 285.0.0'
301
+ project_id : ${{ secrets.GCP_PROJECT_ID }}
302
+ service_account_email : ${{ secrets.GCP_SA_EMAIL }}
303
+ service_account_key : ${{ secrets.GCP_SA_KEY }}
304
+ - name : Install helm
305
+ run : |
306
+ curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
307
+ - name : Configure helm
308
+ run : |
309
+ helm init -c
310
+ helm repo add bitnami https://charts.bitnami.com/bitnami
311
+ - name : Set Azure DNS
312
+ run : |
313
+ echo "$(getent hosts $ARM_LOCATION.management.azure.com | awk '{ print $1 }') management.azure.com" | sudo tee --append /etc/hosts
314
+ - name : Login to Google Cloud Registry
315
+ run : |
316
+ gcloud --quiet auth configure-docker
317
+ - name : Install Pulumi CLI
318
+ uses : pulumi/action-install-pulumi-cli@releases/v1
319
+ - uses : actions/checkout@v2
320
+ - name : Install Go dependencies
321
+ run : make ensure
322
+ - name : Setup Config
323
+ run : |
324
+ mkdir -p "$HOME/.kube/"
325
+ pulumi stack -s "${{ secrets.PULUMI_TEST_OWNER }}/${{ github.sha }}" -C misc/scripts/testinfra/ output kubeconfig >~/.kube/config
326
+ - name : Run ${{ matrix.tests-set }} Tests
327
+ run : make specific_test_set TestSet=Kubernetes
0 commit comments