Skip to content

Commit 0672883

Browse files
authored
Create ci.yml
git add .github/workflows/ci.yml git commit -m "ci: add GitHub Actions workflow for backend and frontend checks - Python 3.12 syntax check + import verification for api/ - Node 20 frontend build check (yarn install + vite build) - Runs on push and PR to main"
1 parent c6720a4 commit 0672883

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
backend:
11+
name: Backend checks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.12"
19+
20+
- name: Install dependencies
21+
run: pip install -r requirements.txt
22+
23+
- name: Syntax check
24+
run: python -m py_compile api/detect_public.py && python -m py_compile api/scan.py
25+
26+
- name: Verify imports
27+
run: python -c "from api.detect_public import run_scan, run_auto_scan, ScanConfig, ALL_DETECTORS; print(f'{len(ALL_DETECTORS)} detectors loaded')"
28+
29+
frontend:
30+
name: Frontend build
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: "20"
38+
39+
- name: Install dependencies
40+
working-directory: frontend
41+
run: yarn install --frozen-lockfile || yarn install
42+
43+
- name: Build
44+
working-directory: frontend
45+
run: yarn build

0 commit comments

Comments
 (0)