Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kroune committed Jan 30, 2025
1 parent 37fe829 commit 51cacfb
Showing 1 changed file with 18 additions and 32 deletions.
50 changes: 18 additions & 32 deletions .github/workflows/loadTesting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
path: server

- name: Set up JDK 21
uses: actions/setup-java@v4
Expand All @@ -32,45 +30,41 @@ jobs:
sudo chmod -R ugo+rws /etc/game-server/
touch /etc/game-server/config.json
echo -n ${{ secrets.TEST_CONFIG }} | base64 -d >> /etc/game-server/config.json
cp .github/workflows/2000-rps.js ~/
# - name: Run tests
# run: |
# cd server
# gradle test --rerun
- name: Run tests
run: gradle test --rerun-tasks

- name: Build jar
run: |
cd server
gradle build -x test
run: gradle build

- name: Build and Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: server/Dockerfile
file: ./Dockerfile
push: false
tags: testing/backend

- name: Checkout kubernetes cluster
uses: actions/checkout@v4
with:
path: kubernetes
token: ${{ secrets.GH_PAT }}
repository: kroune/kuber-configs

# - name: Create cluster
# run: |
# cd kubernetes
# kind create cluster --config kind/cluster.yaml
# kind load docker-image testing/backend
# python -m scripts.main
# sleep 120s
- name: Create cluster
run: |
kind create cluster --config kind/cluster.yaml
kind load docker-image testing/backend
python -m scripts.main
sleep 120s
# - name: Check connection
# run: |
# kubectl get pods --all-namespaces
# curl -s http://localhost:30066/
- name: Check connection
run: |
kubectl get pods --all-namespaces
curl -s http://localhost:30066/
cd ../nine-mens-morris-server
- name: Install k6
Expand All @@ -80,13 +74,5 @@ jobs:

- name: 2000 RPS test
run: |
ls -hlas
ls -hlas ..
cd server
ls -hlas
cd .github
ls -hlas
cd workflows
ls -hlas
ls -hlas ..
k6 run ./2000-rps.js &
ls -hlas ~
k6 run ~/2000-rps.js &

0 comments on commit 51cacfb

Please sign in to comment.