File tree Expand file tree Collapse file tree
projects/01_api_health_check/bash Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,16 +17,21 @@ TIMEOUT="${2:-10}"
1717TS=" $( date +" %Y%m%d_%H%M%S" ) "
1818OUT_FILE=" ${OUTPUT_DIR} /healthcheck_${TS} .json"
1919
20- # Activate virtual environment (cross-platform)
21- if [ -f " ${REPO_ROOT} /.venv/Scripts/activate" ]; then
22- # Windows (Git Bash)
23- source " ${REPO_ROOT} /.venv/Scripts/activate"
24- elif [ -f " ${REPO_ROOT} /.venv/bin/activate" ]; then
25- # Linux/macOS
26- source " ${REPO_ROOT} /.venv/bin/activate"
20+ # Activate virtual environment (skip in CI)
21+ # GitHub Actions sets CI=true and doesn't need venv
22+ if [ " ${CI:- false} " != " true" ]; then
23+ if [ -f " ${REPO_ROOT} /.venv/Scripts/activate" ]; then
24+ # Windows (Git Bash)
25+ source " ${REPO_ROOT} /.venv/Scripts/activate"
26+ elif [ -f " ${REPO_ROOT} /.venv/bin/activate" ]; then
27+ # Linux/macOS
28+ source " ${REPO_ROOT} /.venv/bin/activate"
29+ else
30+ echo " Warning: Virtual environment not found at ${REPO_ROOT} /.venv"
31+ echo " Continuing with system Python..."
32+ fi
2733else
28- echo " Error: Virtual environment not found at ${REPO_ROOT} /.venv"
29- exit 1
34+ echo " Running in CI environment, using system Python"
3035fi
3136
3237# Run health check
You can’t perform that action at this time.
0 commit comments