This commit is contained in:
leehk 2025-04-17 15:25:11 +08:00
parent 81a9579627
commit 2075536a66
2 changed files with 6 additions and 6 deletions

View File

@ -73,17 +73,17 @@ jobs:
testContainerName: tests-aimingmedai
# Pass test environment variables as JSON string
testEnvs: >
'[
[
"FRONTEND_URL=http://frontend:80",
"BACKEND_URL=http://backend:80",
"ENVIRONMENT=dev",
"TESTING=1",
]'
]
# Pass test directories as JSON string
tests: >
'[
[
"tests/integration/backend",
]'
]
# Pass image definitions for compose setup as JSON string
# Sensitive values should be passed via secrets and referenced within the template
images: >

View File

@ -146,8 +146,8 @@ jobs:
- name: Run Tests
shell: bash
run: |
TEST_DIRS='["tests/integration/backend"]'
TEST_ENVS_JSON='["FRONTEND_URL=http://frontend:80","BACKEND_URL=http://backend:80","ENVIRONMENT=dev","TESTING=1"]'
TEST_DIRS='${ inputs.tests }' # JSON string of test directories/commands
TEST_ENVS_JSON='${ inputs.testEnvs }' # JSON string of environment variables
RESULTS_PATH="${{ inputs.testResultsPath }}"
STAGING_DIR="${{ runner.temp }}/test-results" # Use runner temp dir for results
mkdir -p "$STAGING_DIR"