Skip to content

Commit 715fc37

Browse files
committed
feat(testing): add final cypress e2e tests and workflow
1 parent 87e1632 commit 715fc37

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/e2e-tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: 'WrongSecrets CTF Party: E2E Tests'
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
e2e-test:
9+
name: Run Cypress E2E Tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Code
13+
uses: actions/checkout@v4
14+
15+
- name: Start Minikube
16+
uses: medyagh/setup-minikube@latest
17+
with:
18+
driver: docker
19+
cpus: '4'
20+
memory: '11000'
21+
kubernetes-version: 'v1.32.0'
22+
23+
- name: Install Helm
24+
uses: azure/setup-helm@v4
25+
26+
- name: Install yq
27+
run: sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq
28+
29+
- name: Run Deployment Script
30+
run: ./build-and-deploy-minikube.sh
31+
32+
- name: Wait for deployment to be ready
33+
run: kubectl wait --for=condition=available deployment/wrongsecrets-balancer --timeout=300s
34+
35+
- name: Install Cypress and Run Tests
36+
uses: cypress-io/github-action@v6
37+
with:
38+
working-directory: wrongsecrets-balancer
39+
wait-on: 'http://localhost:3000'
40+
wait-on-timeout: 300
41+
browser: chrome
42+
headless: true

0 commit comments

Comments
 (0)