fix(ci): define job-level env variables to harden environment variable persistence in Gitea Actions
This commit is contained in:
+16
-16
@@ -16,6 +16,12 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
validate-core:
|
validate-core:
|
||||||
runs-on: ubuntu-latest
|
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:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16
|
image: postgres:16
|
||||||
@@ -48,14 +54,12 @@ jobs:
|
|||||||
- name: Setup Python Environment
|
- name: Setup Python Environment
|
||||||
run: |
|
run: |
|
||||||
# 순수 Python 패키지만 설치 (numpy/pandas 제외 — ARMv7l 휠 없음)
|
# 순수 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"
|
mkdir -p "$PYTHON_DEPS"
|
||||||
/usr/bin/python3 --version
|
/usr/bin/python3 --version
|
||||||
/usr/bin/python3 -m pip --version
|
/usr/bin/python3 -m pip --version
|
||||||
/usr/bin/python3 -m pip install --disable-pip-version-check --quiet \
|
/usr/bin/python3 -m pip install --disable-pip-version-check --quiet \
|
||||||
--target "$PYTHON_DEPS" requests pyyaml openpyxl pytest "psycopg[binary]"
|
--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")'
|
/usr/bin/python3 -c 'import requests, yaml, openpyxl, pytest, psycopg; print("Python dependencies: PASS")'
|
||||||
|
|
||||||
- name: Apply Database Migrations (CI Postgres service)
|
- name: Apply Database Migrations (CI Postgres service)
|
||||||
@@ -298,34 +302,30 @@ jobs:
|
|||||||
|
|
||||||
validate-ui-and-storage:
|
validate-ui-and-storage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
PYTHONPATH: "$HOME/python_deps/ui:."
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Setup Python Environment
|
- name: Setup Python Environment
|
||||||
run: |
|
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"
|
mkdir -p "$PYTHON_DEPS"
|
||||||
/usr/bin/python3 --version
|
/usr/bin/python3 --version
|
||||||
/usr/bin/python3 -m pip --version
|
/usr/bin/python3 -m pip --version
|
||||||
/usr/bin/python3 -m pip install --disable-pip-version-check --quiet \
|
/usr/bin/python3 -m pip install --disable-pip-version-check --quiet \
|
||||||
--target "$PYTHON_DEPS" requests pyyaml openpyxl pytest
|
--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")'
|
/usr/bin/python3 -c 'import requests, yaml, openpyxl, pytest; print("Python dependencies: PASS")'
|
||||||
|
|
||||||
- name: Validate Snapshot Admin Web UI
|
- name: Validate Snapshot Admin Web UI
|
||||||
run: |
|
run: python3 tools/validate_snapshot_admin_web_v1.py
|
||||||
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
|
|
||||||
|
|
||||||
- name: Validate Storage Backend Contracts
|
- name: Validate Storage Backend Contracts
|
||||||
run: |
|
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
|
||||||
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
|
|
||||||
|
|
||||||
- name: Notify PR Result
|
- name: Notify PR Result
|
||||||
if: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
|
|||||||
Reference in New Issue
Block a user