Added Pipeline and edited testcases #1
Workflow file for this run
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: ChaosCenter E2E testing | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
run-litmus: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Add litmus Chaos Repository | ||
run: helm repo add litmuschaos https://litmuschaos.github.io/litmus-helm/ | ||
- name: Start minikube | ||
run: minikube start | ||
- name: Apply Litmus manifest | ||
run: | | ||
kubectl apply -f https://raw.githubusercontent.com/litmuschaos/litmus/master/chaoscenter/manifests/litmus-cluster-scope.yaml | ||
- name: Wait for Litmus pods to be ready | ||
run: | | ||
kubectl wait --for=condition=Ready pods --all --namespace=litmus --timeout=300s | ||
- name: Extract Minikube IP and NodePort | ||
id: extract-urls | ||
run: | | ||
MINIKUBE_IP=$(minikube ip) | ||
NODE_PORT=$(kubectl get svc chaos-litmus-frontend-service -n litmus -o jsonpath='{.spec.ports[0].nodePort}') | ||
echo "MINIKUBE_IP=$MINIKUBE_IP" >> $GITHUB_ENV | ||
echo "NODE_PORT=$NODE_PORT" >> $GITHUB_ENV | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Cypress run with env | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
start: npm start | ||
working-directory: chaoscenter | ||
env: | ||
CYPRESS_baseUrl: http://${{ env.MINIKUBE_IP }}:${{ env.NODE_PORT }} | ||