Skip to content

Commit 3deae2f

Browse files
committed
ci: add GitHub Actions for frontend build and backend syntax check
1 parent 1ad3ed6 commit 3deae2f

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/ci.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main, dev ]
8+
9+
jobs:
10+
frontend-build:
11+
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: frontend
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: 'npm'
24+
cache-dependency-path: frontend/package-lock.json
25+
26+
- name: Install deps
27+
run: npm ci
28+
29+
- name: Build (REACT_APP_API_URL dummy)
30+
run: REACT_APP_API_URL=http://localhost:5000 npm run build
31+
32+
backend-validate:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
38+
- name: Setup Python
39+
uses: actions/setup-python@v5
40+
with:
41+
python-version: '3.12'
42+
43+
- name: Install backend deps
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install -r backend/requirements.txt
47+
48+
- name: Basic syntax check
49+
run: python -m compileall -q backend
50+
51+

0 commit comments

Comments
 (0)