-
Notifications
You must be signed in to change notification settings - Fork 75
94 lines (77 loc) · 2.07 KB
/
Copy pathci.yml
File metadata and controls
94 lines (77 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: ["**"]
jobs:
backend:
name: Backend Tests (Node.js)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
- name: Install backend dependencies
run: npm ci
- name: Lint backend code
run: npx eslint . --ext .js
- name: Run backend tests
run: npm test
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: backend-test-logs
path: "*.log"
if-no-files-found: ignore
rag-service:
name: RAG Service Tests (Python)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
- name: Install RAG dependencies
run: |
cd rag-service
pip install -r requirements.txt
pip install pytest flake8
- name: Lint Python code
run: |
cd rag-service
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run RAG tests
run: |
cd rag-service
python -m pytest . -v --tb=short
frontend:
name: Frontend Build Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
run: |
cd frontend
npm ci
- name: Lint frontend code
run: |
cd frontend
npx eslint src/ --ext .js,.jsx
- name: Build frontend
run: |
cd frontend
npm run build