diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 201533cd..b506defa 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -16,6 +16,12 @@ concurrency: jobs: validate-core: runs-on: ubuntu-latest + env: + QE_WBS_PG_DSN: "host=postgres port=5432 dbname=quantenginedb user=quantengine_ci password=quantengine_ci options='-c search_path=quantengine'" + PGPASSWORD: quantengine_ci + PGHOST: postgres + PGPORT: 5432 + PYTHONPATH: "$HOME/python_deps/core:." services: postgres: image: postgres:16 @@ -48,14 +54,12 @@ jobs: - name: Setup Python Environment run: | # 순수 Python 패키지만 설치 (numpy/pandas 제외 — ARMv7l 휠 없음) - PYTHON_DEPS="$HOME/python_deps/$(md5sum tools/validate_specs.py | cut -d' ' -f1)" + PYTHON_DEPS="$HOME/python_deps/core" mkdir -p "$PYTHON_DEPS" /usr/bin/python3 --version /usr/bin/python3 -m pip --version /usr/bin/python3 -m pip install --disable-pip-version-check --quiet \ --target "$PYTHON_DEPS" requests pyyaml openpyxl pytest "psycopg[binary]" - export PYTHONPATH="$PYTHON_DEPS:${PYTHONPATH:-}" - echo "PYTHONPATH=$PYTHON_DEPS:${PYTHONPATH:-}" >> "$GITHUB_ENV" /usr/bin/python3 -c 'import requests, yaml, openpyxl, pytest, psycopg; print("Python dependencies: PASS")' - name: Apply Database Migrations (CI Postgres service) @@ -298,34 +302,30 @@ jobs: validate-ui-and-storage: runs-on: ubuntu-latest - + env: + PYTHONPATH: "$HOME/python_deps/ui:." + steps: - name: Checkout Code uses: actions/checkout@v3 with: fetch-depth: 0 - + - name: Setup Python Environment run: | - PYTHON_DEPS="$HOME/python_deps/$(md5sum tools/validate_snapshot_admin_web_v1.py | cut -d' ' -f1)" + PYTHON_DEPS="$HOME/python_deps/ui" mkdir -p "$PYTHON_DEPS" /usr/bin/python3 --version /usr/bin/python3 -m pip --version /usr/bin/python3 -m pip install --disable-pip-version-check --quiet \ --target "$PYTHON_DEPS" requests pyyaml openpyxl pytest - export PYTHONPATH="$PYTHON_DEPS:${PYTHONPATH:-}" - echo "PYTHONPATH=$PYTHON_DEPS:${PYTHONPATH:-}" >> "$GITHUB_ENV" /usr/bin/python3 -c 'import requests, yaml, openpyxl, pytest; print("Python dependencies: PASS")' - + - name: Validate Snapshot Admin Web UI - run: | - PYTHON_DEPS="$HOME/python_deps/$(md5sum tools/validate_snapshot_admin_web_v1.py | cut -d' ' -f1)" - PYTHONPATH="$PYTHON_DEPS:${PYTHONPATH:-}" python3 tools/validate_snapshot_admin_web_v1.py - + run: python3 tools/validate_snapshot_admin_web_v1.py + - name: Validate Storage Backend Contracts - run: | - PYTHON_DEPS="$HOME/python_deps/$(md5sum tools/validate_snapshot_admin_web_v1.py | cut -d' ' -f1)" - PYTHONPATH="$PYTHON_DEPS:${PYTHONPATH:-}" python3 -m pytest tests/unit/test_storage_backend_v1.py tests/unit/test_validate_kis_api_credentials_v1.py tests/unit/test_qualitative_sell_strategy_store_v1.py tests/unit/test_kis_api_client_v1.py tests/unit/test_snapshot_admin_store_v1.py tests/unit/test_snapshot_admin_web_v1.py -q + run: python3 -m pytest tests/unit/test_storage_backend_v1.py tests/unit/test_validate_kis_api_credentials_v1.py tests/unit/test_qualitative_sell_strategy_store_v1.py tests/unit/test_kis_api_client_v1.py tests/unit/test_snapshot_admin_store_v1.py tests/unit/test_snapshot_admin_web_v1.py -q - name: Notify PR Result if: always() && github.event_name == 'pull_request'