-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Pipeline and edited testcases (#408)
* Added Pipeline and edited testcases Signed-off-by: Dhanush0369 <[email protected]> * Update E2E-chaoscenter workflow and cypress config file Signed-off-by: Dhanush0369 <[email protected]> * Update E2E-chaoscenter workflow Signed-off-by: Dhanush0369 <[email protected]> * Update E2E-chaoscenter workflow Signed-off-by: Dhanush0369 <[email protected]> * Update E2E-chaoscenter workflow Signed-off-by: Dhanush0369 <[email protected]> * Updated E2E-chaoscenter workflow Signed-off-by: Dhanush0369 <[email protected]> --------- Signed-off-by: Dhanush0369 <[email protected]>
- Loading branch information
1 parent
a08a934
commit cf0ef5c
Showing
8 changed files
with
66 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
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: Create litmus namespace | ||
run: kubectl create ns litmus | ||
|
||
- name: Install Litmus | ||
run: | | ||
helm install chaos litmuschaos/litmus \ | ||
--namespace=litmus \ | ||
--set portal.frontend.service.type=NodePort | ||
- name: Wait for pods to be ready | ||
run: | | ||
sleep 30s | ||
while [[ $(kubectl get pods -n litmus --no-headers | grep -v 'Running\|Completed' | wc -l) -gt 0 ]]; do | ||
echo "Waiting for pods to be ready..." | ||
kubectl get pods -n litmus | ||
sleep 10 | ||
done | ||
echo "All pods are ready!" | ||
- 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 }} |
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
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
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
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
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
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
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