ci: parallelize independent validation jobs
This commit is contained in:
+6
-12
@@ -7,9 +7,11 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Phase 3: Validator pipeline
|
# Validator pipeline. Independent validation jobs run in parallel.
|
||||||
# Main branch push validation moved to merge-to-main.yml
|
|
||||||
# This workflow runs validators only on PRs for feedback
|
concurrency:
|
||||||
|
group: quantengine-ci-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate-core:
|
validate-core:
|
||||||
@@ -65,7 +67,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "=== npm install (최초 or lock 변경) ==="
|
echo "=== npm install (최초 or lock 변경) ==="
|
||||||
npm install --quiet
|
npm ci --quiet
|
||||||
# 캐시 저장
|
# 캐시 저장
|
||||||
mkdir -p "$CACHE_DIR"
|
mkdir -p "$CACHE_DIR"
|
||||||
cp -r node_modules "$CACHE_DIR/node_modules"
|
cp -r node_modules "$CACHE_DIR/node_modules"
|
||||||
@@ -198,8 +200,6 @@ jobs:
|
|||||||
|
|
||||||
validate-ui-and-storage:
|
validate-ui-and-storage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: validate-core
|
|
||||||
if: needs.validate-core.result == 'success'
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
@@ -220,23 +220,17 @@ jobs:
|
|||||||
/usr/bin/python3 -c 'import requests, yaml, openpyxl; print("Python dependencies: PASS")'
|
/usr/bin/python3 -c 'import requests, yaml, openpyxl; print("Python dependencies: PASS")'
|
||||||
|
|
||||||
- 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: always() && github.event_name == 'pull_request'
|
if: always() && github.event_name == 'pull_request'
|
||||||
env:
|
env:
|
||||||
CORE_RESULT: ${{ needs.validate-core.result }}
|
|
||||||
STAGE_RESULT: ${{ job.status }}
|
STAGE_RESULT: ${{ job.status }}
|
||||||
run: |
|
run: |
|
||||||
STATUS="$STAGE_RESULT"
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user