WBS-7.9: split CI core and ui/storage validation jobs

This commit is contained in:
2026-06-22 01:42:38 +09:00
parent 89b4c118d1
commit cfcf65f822
+53 -3
View File
@@ -19,7 +19,7 @@ on:
# ───────────────────────────────────────────────────────────────── # ─────────────────────────────────────────────────────────────────
jobs: jobs:
validate-and-build: validate-core:
runs-on: self-hosted runs-on: self-hosted
steps: steps:
@@ -153,16 +153,66 @@ jobs:
- name: Validate Snapshot Admin Workflow - name: Validate Snapshot Admin Workflow
run: python3 tools/validate_snapshot_admin_workflow_v1.py run: python3 tools/validate_snapshot_admin_workflow_v1.py
validate-ui-and-storage:
runs-on: self-hosted
needs: validate-core
if: always()
steps:
- name: Checkout Code
run: |
if [ -d .git ]; then
git remote set-url origin http://x-access-token:${{ secrets.GITHUB_TOKEN }}@192.168.123.100:8418/KimJaeHyun/myfinance.git
else
git init
git remote add origin http://x-access-token:${{ secrets.GITHUB_TOKEN }}@192.168.123.100:8418/KimJaeHyun/myfinance.git
fi
git fetch origin ${{ github.sha }} --depth=1
git reset --hard FETCH_HEAD
- name: Setup Python Environment
run: |
VENV_BASE=/volume1/gitea/python_venv
REQ_HASH=$(md5sum tools/validate_snapshot_admin_web_v1.py 2>/dev/null | cut -d' ' -f1 || echo "default")
VENV="$VENV_BASE/$REQ_HASH"
if [ ! -f "$VENV/bin/python" ]; then
echo "=== venv 신규 생성: $REQ_HASH ==="
mkdir -p "$VENV_BASE"
/usr/bin/python3 -m venv "$VENV"
if [ ! -f "$VENV/bin/pip" ]; then
echo "pip missing in venv, installing via get-pip.py..."
curl -sS https://bootstrap.pypa.io/pip/3.8/get-pip.py -o get-pip.py
"$VENV/bin/python" get-pip.py --quiet
rm get-pip.py
fi
"$VENV/bin/pip" install --upgrade pip --quiet
"$VENV/bin/pip" install requests pyyaml openpyxl --quiet
else
echo "=== venv 캐시 히트: $("$VENV/bin/python" --version 2>&1) ==="
fi
echo "$VENV/bin" >> $GITHUB_PATH
- name: Validate Snapshot Admin Web UI - name: Validate Snapshot Admin Web UI
if: needs.validate-core.result == 'success'
run: python3 tools/validate_snapshot_admin_web_v1.py run: python3 tools/validate_snapshot_admin_web_v1.py
- name: Validate Storage Backend Contracts - name: Validate Storage Backend Contracts
if: needs.validate-core.result == 'success'
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 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 - name: Notify PR Result
if: github.event_name == 'pull_request' if: always() && github.event_name == 'pull_request'
env:
CORE_RESULT: ${{ needs.validate-core.result }}
STAGE_RESULT: ${{ job.status }}
run: | run: |
STATUS="${{ job.status }}" STATUS="$STAGE_RESULT"
if [ "$CORE_RESULT" != "success" ]; then
STATUS="failure"
fi
PR_NUM="${{ github.event.pull_request.number }}" PR_NUM="${{ github.event.pull_request.number }}"
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
if [ "$STATUS" = "success" ]; then if [ "$STATUS" = "success" ]; then