diff --git a/.github/workflows/load.yml b/.github/workflows/load.yml new file mode 100644 index 0000000..05125ee --- /dev/null +++ b/.github/workflows/load.yml @@ -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 diff --git a/Makefile b/Makefile index 013f614..2b092a8 100644 --- a/Makefile +++ b/Makefile @@ -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