Skip to content

Commit

Permalink
Merge pull request #5 from madflojo/load
Browse files Browse the repository at this point in the history
Adding load testing CI step
  • Loading branch information
madflojo authored Nov 4, 2023
2 parents 92be317 + e28074b commit 17eef38
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/load.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: load

on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
load-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run the Service
run: make run-background
- name: Wait for the Service to be ready
run: |
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost/ready)" != "200" ]]; do sleep 5; done
- name: Configure Test
run: |
cat << EOF > loadtest-config.yml
url: http://localhost:8080
SLOs:
http/error-rate: 0
http/latency-p99.9: 5
EOF
- uses: iter8-tools/iter8-action@v1
with:
chart: load-test-http
valuesFile: loadtest-config.yml
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,17 @@ tests:

docker-compose:
docker compose up -d mysql
sleep 15
docker compose up airport-lookup-example

docker-compose-background:
docker compose up -d mysql
sleep 15
docker compose up -d airport-lookup-example

run: build docker-compose
run-nobuild: docker-compose
run-background: build docker-compose-background

clean:
rm -rf functions/build
Expand Down

0 comments on commit 17eef38

Please sign in to comment.