Skip to content

Commit 6045ff5

Browse files
committed
Integration test against the already deployed version
1 parent dc52c72 commit 6045ff5

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

.github/workflows/deploy-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
- name: Wait for Kubernetes resources to be ready
3333
run: |
34-
kubectl wait --for=condition=available --timeout=600s deployment --namespace xcermak5 --all
34+
kubectl wait --for=condition=available --timeout=1200s deployment --namespace xcermak5 --all
3535
kubectl get all --namespace xcermak5
3636
3737
- name: Run Integration Tests
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Run Integration Tests on Existing Deployment
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run-integration-tests:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
13+
- name: Set up kubectl
14+
uses: azure/setup-kubectl@v1
15+
with:
16+
version: v1.19.7
17+
18+
- name: Configure kubeconfig
19+
run: |
20+
# Assuming you have the kubeconfig file as a secret in GitHub Actions
21+
echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config
22+
kubectl config set-context --current --namespace=xcermak5
23+
24+
- name: Run Integration Tests
25+
run: |
26+
kubectl get pods --namespace xcermak5
27+
kubectl get services --namespace xcermak5
28+
# POD_NAME=$(kubectl get pods --namespace xcermak5 -l app=mychart -o jsonpath="{.items[0].metadata.name}")
29+
# kubectl exec --namespace xcermak5 $POD_NAME -- curl -f http://localhost:8080/healthz

0 commit comments

Comments
 (0)