-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add load test github actions workflow
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Load Test | ||
|
||
on: | ||
### BEGIN: REMOVE BEFORE MERGING | ||
pull_request: | ||
branches: | ||
- develop | ||
push: | ||
branches: | ||
- develop | ||
### END: REMOVE BEFORE MERGING | ||
workflow_dispatch: | ||
|
||
env: | ||
AERIE_USERNAME: "aerie" | ||
AERIE_PASSWORD: "aerie" | ||
HASURA_GRAPHQL_ADMIN_SECRET: "aerie" | ||
HASURA_GRAPHQL_JWT_SECRET: '{ "type": "HS256", "key": "oursupersecretsupersecurekey1234567890" }' | ||
POSTGRES_USER: "postgres" | ||
POSTGRES_PASSWORD: "postgres" | ||
|
||
jobs: | ||
load-test: | ||
runs-on: ubuntu-latest | ||
environment: load-test | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "19" | ||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup Gradle | ||
uses: gradle/gradle-build-action@v2 | ||
- name: Assemble | ||
run: ./gradlew assemble --parallel | ||
- name: Start Services | ||
run: | | ||
docker compose up -d --build --quiet-pull | ||
docker images | ||
docker ps -a | ||
- name: Sleep for 1 min | ||
shell: bash | ||
run: sleep 1m | ||
- name: Run load test | ||
run: | | ||
cd load-tests | ||
./load-test.sh | ||
- name: Upload Load Test Results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Load Test Results | ||
path: "**/load-tests/load-report.*" | ||
- name: Stop Services | ||
if: always() | ||
run: | | ||
docker ps -a | ||
docker compose down | ||
docker ps -a | ||
- name: Prune | ||
if: always() | ||
run: docker volume prune -fa |