Skip to content

update

update #59

Workflow file for this run

name: LoadTesting
on:
push:
workflow_dispatch:
jobs:
load_test:
runs-on: ubuntu-latest
env:
IS_PROD: False
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
path: server
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Create example config
run: |
sudo mkdir /etc/game-server/
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
cd server
# - name: Run tests
# run: gradle test --rerun
- name: Build jar
run: |
cd server
gradle build -x test
- name: Build and Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: false
tags: testing/backend
- name: Cd out of backend
run: |
cd ..
- name: Checkout kubernetes cluster
uses: actions/checkout@v4
with:
path: kubernetes
token: ${{ secrets.GH_PAT }}
repository: kroune/kuber-configs
# - 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/
# cd ../nine-mens-morris-server
- name: Install k6
uses: grafana/setup-k6-action@v1
with:
k6-version: '0.56.0'
- name: 2000 RPS test
run: |
ls -hlas
ls -hlas ..
cd ../kubernetes
ls -hlas
cd .github
ls -hlas
cd workflows
ls -hlas
ls -hlas ..
k6 run ./2000-rps.js &