mirror of
https://github.com/aimingmed/aimingmed-ai.git
synced 2026-01-19 21:37:31 +08:00
test
This commit is contained in:
parent
13d5ab4098
commit
bb27bfcfee
92
.github/workflows/build_new.yml
vendored
92
.github/workflows/build_new.yml
vendored
@ -61,51 +61,55 @@ jobs:
|
||||
test:
|
||||
name: Run Integration Tests
|
||||
needs: build # Ensure this job runs after the build job
|
||||
runs-on: ubuntu-latest # Specify the runner
|
||||
# Define necessary permissions if needed (e.g., for GitHub Packages)
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write # If pushing to GitHub Packages registry
|
||||
# Call the reusable workflow for testing
|
||||
uses: ./.github/workflows/template_test.yml # Path to the reusable workflow file
|
||||
with:
|
||||
projectName: aimingmed-ai
|
||||
image_repo: ghcr.io/$(echo $GITHUB_REPOSITORY | tr '[A-Z]' '[a-z]')
|
||||
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: >
|
||||
[
|
||||
{
|
||||
"name": "backend-aimingmedai",
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
"TESTING": "1",
|
||||
"DEEPSEEK_API_KEY": "",
|
||||
"TAVILY_API_KEY": ""
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "frontend-aimingmedai",
|
||||
"depends_on": ["backend-aimingmedai"],
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
"TESTING": "1",
|
||||
"LOG_LEVEL": "DEBUG"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
steps:
|
||||
- name: Set Image Repo
|
||||
id: set_image_repo
|
||||
run: echo "image_repo=ghcr.io/$(echo "$GITHUB_REPOSITORY" | tr '[A-Z]' '[a-z]')" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
# Call the reusable workflow for testing
|
||||
- uses: ./.github/workflows/template_test.yml # Path to the reusable workflow file
|
||||
with:
|
||||
projectName: aimingmed-ai
|
||||
image_repo: ${{ steps.set_image_repo.outputs.image_repo }}
|
||||
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
|
||||
images: >
|
||||
[
|
||||
{
|
||||
"name": "backend-aimingmedai",
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
"TESTING": "1",
|
||||
"DEEPSEEK_API_KEY": "",
|
||||
"TAVILY_API_KEY": ""
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "frontend-aimingmedai",
|
||||
"depends_on": ["backend-aimingmedai"],
|
||||
"env": {
|
||||
"ENVIRONMENT": "dev",
|
||||
"TESTING": "1",
|
||||
"LOG_LEVEL": "DEBUG"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user