Adding Gatling YAML spec files #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ephemeral Test Using Testkube | |
on: | |
pull_request: | |
jobs: | |
testkube-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Kind Cluster | |
uses: helm/kind-action@v1.9.0 | |
- name: Deploy Sample Application | |
run: | | |
kubectl apply -f https://raw.githubusercontent.com/kubeshop/testkube-examples/main/Ephemeral%20Environments%20Using%20Github%20Actions/nginx-deployment.yaml | |
- name: Setup Testkube with Helm | |
run: | | |
helm repo add kubeshop https://kubeshop.github.io/helm-charts; | |
# Create GitHub secrets in your repo for org_id, env_id and api_token | |
- name: Configure Testkube Agent | |
run: | | |
helm upgrade --install --reuse-values --create-namespace testkube \ | |
kubeshop/testkube \ | |
--set testkube-api.cloud.key=${{ secrets.TESTKUBE_API_TOKEN }} \ | |
--set testkube-api.cloud.orgId=${{ secrets.TESTKUBE_ORG_ID }} \ | |
--set testkube-api.cloud.envId=${{ secrets.TESTKUBE_ENV_ID }} \ | |
--set testkube-api.minio.enabled=false \ | |
--set mongodb.enabled=false \ | |
--set testkube-dashboard.enabled=false \ | |
--set testkube-api.cloud.url=agent.testkube.io:443 \ | |
--namespace testkube | |
- name: Check Pods Status | |
run: | | |
kubectl get pods --all-namespaces -o wide | |
POD_NAME=$(kubectl get pods -n testkube | grep testkube-api-server | awk '{print $1}') | |
kubectl wait --for=condition=Ready pod/$POD_NAME -n testkube --timeout=100s | |
- name: Run Testkube Test | |
uses: kubeshop/setup-testkube@v1 | |
- run: | | |
testkube create test --name curl-nginx-test --type curl/test --update --test-content-type git-file --git-uri https://github.com/techmaharaj/Testkube-Ephemeral-Environment.git --git-branch main --git-path curl-test.json | |
testkube run test curl-nginx-test -f --variable "NGINX_URL=http://nginx-service.default.svc.cluster.local" |