Skip to content

Commit c5022bb

Browse files
authored
Merge pull request #23 from vdice/ci/smoke-test
ci(.github): add marketplace-smoke-test.yaml
2 parents b3fa8a0 + b84879c commit c5022bb

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Marketplace Smoketest
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
jobs:
10+
helm-install-smoke-test:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install helm
16+
uses: Azure/setup-helm@v4
17+
with:
18+
version: v3.15.4
19+
20+
- name: create kind cluster
21+
uses: helm/kind-action@v1
22+
23+
- name: helm install spinkube
24+
run: |
25+
helm install spinkube \
26+
--wait \
27+
--namespace spinkube \
28+
--create-namespace \
29+
--debug \
30+
marketplace/charts/spinkube-azure-marketplace
31+
32+
- name: run spin app
33+
run: |
34+
kubectl apply -f https://raw.githubusercontent.com/spinkube/spin-operator/main/config/samples/simple.yaml
35+
kubectl rollout status deployment simple-spinapp --timeout 90s
36+
kubectl get pods -A
37+
kubectl port-forward svc/simple-spinapp 8083:80 &
38+
timeout 15s bash -c 'until curl -f -vvv http://localhost:8083/hello; do sleep 2; done'
39+
40+
- name: debug
41+
if: failure()
42+
run: |
43+
kubectl get pods -A
44+
kubectl get certificate -n spinkube
45+
kubectl logs -n spinkube -l app.kubernetes.io/name=spin-operator || true
46+
kubectl describe -n spinkube pod -l app.kubernetes.io/name=spin-operator || true
47+
kubectl logs -n spinkube -l app.kubernetes.io/name=kwasm-operator || true
48+
kubectl describe -n spinkube pod -l app.kubernetes.io/name=kwasm-operator || true
49+
kubectl logs -l core.spinoperator.dev/app-name=simple-spinapp || true
50+
kubectl describe pod -l core.spinoperator.dev/app-name=simple-spinapp || true
51+
52+
- name: Verify curl
53+
run: curl localhost:8083/hello

0 commit comments

Comments
 (0)