88 workflow_dispatch :
99
1010jobs :
11+ # ============================================================
12+ # Job 1 -- Code Quality Checks (Python & Prettier)
13+ # ============================================================
1114 code_quality :
1215 name : Code Quality Checks
1316 runs-on : ubuntu-latest
3437 set -euo pipefail
3538 echo "=== Running autoflake check ==="
3639 autoflake --remove-all-unused-imports --remove-unused-variables --recursive --check .
37-
3840 echo "=== Running black check ==="
3941 black . --check
4042
@@ -51,13 +53,13 @@ jobs:
5153 run : |
5254 set -euo pipefail
5355 NODE_GLOBAL=$(npm root -g)
54- echo "=== Running Prettier check for all supported files ==="
56+ echo "=== Running Prettier check ==="
5557 prettier --plugin="$NODE_GLOBAL/prettier-plugin-solidity/dist/index.js" \
5658 --check "**/*.{js,jsx,ts,tsx,json,html,css,md,sol,yml,yaml}"
5759
58- - name : Quality checks complete
59- run : echo "All formatting and quality checks passed."
60-
60+ # ============================================================
61+ # Job 2 -- Backend Tests (Python / Pytest)
62+ # ============================================================
6163 backend_tests :
6264 name : Backend Tests
6365 runs-on : ubuntu-latest
7779 cache : " pip"
7880 cache-dependency-path : code/backend/requirements.txt
7981
80- - name : Install backend dependencies
82+ - name : Install dependencies
8183 run : |
8284 python -m pip install --upgrade pip setuptools wheel
8385 if [ -f "${BACKEND_DIR}/requirements.txt" ]; then
@@ -101,5 +103,42 @@ jobs:
101103 uses : actions/upload-artifact@v4
102104 with :
103105 name : backend-coverage-report
104- path : ${{ env.BACKEND_DIR }} /coverage.xml
106+ path : code/backend /coverage.xml
105107 retention-days : 30
108+
109+ # ============================================================
110+ # Job 3 -- Web Frontend Build
111+ # ============================================================
112+ frontend_build :
113+ name : Frontend Build
114+ runs-on : ubuntu-latest
115+ needs : code_quality
116+
117+ defaults :
118+ run :
119+ working-directory : web-frontend
120+
121+ steps :
122+ - name : Checkout repository
123+ uses : actions/checkout@v4
124+
125+ - name : Set up Node.js 20
126+ uses : actions/setup-node@v4
127+ with :
128+ node-version : " 20"
129+ cache : " npm"
130+ cache-dependency-path : web-frontend/package-lock.json
131+
132+ - name : Install dependencies
133+ run : npm ci
134+
135+ - name : Build frontend
136+ run : npm run build
137+
138+ - name : Upload build artifacts
139+ if : success()
140+ uses : actions/upload-artifact@v4
141+ with :
142+ name : frontend-dist
143+ path : web-frontend/dist/
144+ retention-days : 7
0 commit comments