From 51cacfbbab798018b6aa17948524d8182a63e914 Mon Sep 17 00:00:00 2001 From: kroune <123553746+kroune@users.noreply.github.com> Date: Thu, 30 Jan 2025 21:29:50 +0300 Subject: [PATCH] update --- .github/workflows/loadTesting.yml | 50 +++++++++++-------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/.github/workflows/loadTesting.yml b/.github/workflows/loadTesting.yml index 8e9b102..6de2e2c 100644 --- a/.github/workflows/loadTesting.yml +++ b/.github/workflows/loadTesting.yml @@ -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 @@ -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 @@ -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 & \ No newline at end of file + ls -hlas ~ + k6 run ~/2000-rps.js & \ No newline at end of file