Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.sh text eol=lf
*.tftpl text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
40 changes: 40 additions & 0 deletions .github/workflows/load-test-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ on:
required: true
default: "15m"
type: string
test_mode:
description: "k6 test mode"
required: true
default: "bruno-all-apis"
type: choice
options:
- bruno-all-apis
- whole-user-flow
api_docs_ref:
description: "api-docs git ref used when test_mode is bruno-all-apis"
required: false
default: "main"
type: string
target_base_url:
description: "Target base URL. Empty uses Terraform default."
required: false
Expand Down Expand Up @@ -60,6 +73,15 @@ jobs:
token: ${{ secrets.GH_PAT }}
persist-credentials: false

- uses: actions/checkout@v4
if: inputs.test_mode == 'bruno-all-apis'
with:
repository: solid-connection/api-docs
ref: ${{ inputs.api_docs_ref }}
path: api-docs
token: ${{ secrets.GH_PAT }}
persist-credentials: false

- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ vars.AWS_LOAD_TEST_ROLE_ARN }}
Expand All @@ -80,6 +102,7 @@ jobs:
VUS: ${{ inputs.vus }}
ITERATIONS: ${{ inputs.iterations }}
MAX_DURATION: ${{ inputs.max_duration }}
TEST_MODE: ${{ inputs.test_mode }}
TARGET_BASE_URL: ${{ inputs.target_base_url }}
PROMETHEUS_REMOTE_WRITE_URL: ${{ inputs.prometheus_remote_write_url }}
run: |
Expand All @@ -89,6 +112,23 @@ jobs:
--max-duration "$MAX_DURATION"
)

case "$TEST_MODE" in
bruno-all-apis)
args+=(
--script bruno-all-apis.js
--generate-bruno-script
--bruno-collection-dir "api-docs/Solid Connection"
)
;;
whole-user-flow)
args+=(--script whole-user-flow.js)
;;
*)
echo "::error::Invalid test_mode: $TEST_MODE"
exit 1
;;
esac

if [ -n "$TARGET_BASE_URL" ]; then
args+=(--target-base-url "$TARGET_BASE_URL")
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/load-test-stop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
default: true
type: boolean
destroy_rds:
destroy_infra:
description: "Destroy load test Terraform stack"
required: true
default: true
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
args+=(--restore-stage-dev)
fi

if [ "${{ inputs.destroy_rds }}" != "true" ]; then
if [ "${{ inputs.destroy_infra }}" != "true" ]; then
args+=(--skip-terraform-destroy)
fi

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*.tfvars
.terraform.lock.hcl
modules/shared_resources/dist/*.zip
config/load-test/k6/bruno-all-apis.js
__pycache__/

# --- Secrets (보안상 절대 커밋 금지) ---
*.pem
Expand All @@ -17,4 +19,4 @@ modules/shared_resources/dist/*.zip
.DS_Store

# --- AGENTS ---
AGENTS.local.md
AGENTS.local.md
Loading
Loading