-
Notifications
You must be signed in to change notification settings - Fork 4
133 lines (106 loc) · 3.34 KB
/
Copy pathci.yml
File metadata and controls
133 lines (106 loc) · 3.34 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint-and-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgis/postgis:15-3.4
env:
POSTGRES_USER: sentinel
POSTGRES_PASSWORD: sentinel_test
POSTGRES_DB: sentinel_nigeria_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint web app
run: cd apps/web && npm run lint || echo "Lint not configured yet"
- name: Build web app
run: cd apps/web && npm run build
# Realtime server tests (skip for now until dependencies are configured)
- name: Setup realtime server
run: cd apps/realtime && npm install || echo "Skipping realtime setup"
continue-on-error: true
- name: Build realtime server
run: cd apps/realtime && npm run build || echo "Realtime build not ready yet"
continue-on-error: true
mobile-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: cd apps/mobile && npm install
- name: Lint
run: cd apps/mobile && npm run lint || echo "Lint not configured yet"
continue-on-error: true
- name: Test
run: cd apps/mobile && npm test || echo "Tests not configured yet"
continue-on-error: true
ml-service:
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 dependencies
run: |
cd packages/ml-service
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
cd packages/ml-service
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Test with pytest
run: |
pip install pytest pytest-cov
cd packages/ml-service
pytest tests/ --cov=. --cov-report=xml || true
security-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Placeholder - Bloodhound Security Scan (Coming Soon)
run: echo "Bloodhound Security scanning will be integrated once the GitHub Action is published"
# TODO: Enable when bloodhound-action is published
# - name: Run Bloodhound Security Scan
# uses: bloodhound-security/bloodhound-action@v1
# with:
# api-key: ${{ secrets.BLOODHOUND_API_KEY }}
# scan-type: 'full'
# fail-on: 'critical'
# continue-on-error: true