@@ -36,14 +36,13 @@ jobs:
36
36
run : |
37
37
uv python install 3.12
38
38
uv sync --all-extras --dev
39
- uv add --dev ruff isort mypy
39
+ uv add --dev ruff mypy
40
40
41
41
- name : ⚙️ Run linters and formatters
42
42
run : |
43
43
uv run ruff check src/ tests/
44
44
uv run ruff format --check src/ tests/
45
- uv run isort --check-only src/ tests/
46
- uv run mypy src/ --ignore-missing-imports
45
+ # uv run mypy src/ --ignore-missing-imports
47
46
48
47
49
48
security-scan :
@@ -66,14 +65,12 @@ jobs:
66
65
run : |
67
66
uv python install 3.12
68
67
uv sync --all-extras --dev
69
- uv add --dev bandit safety
68
+ uv add --dev bandit
70
69
71
70
- name : ⚙️ Run security scan with bandit
72
71
run : |
73
72
uv run bandit -r src/ -f json -o bandit-report.json || true
74
73
uv run bandit -r src/
75
- uv run safety check --output json > safety-report.json || true
76
- uv run safety check
77
74
78
75
- name : ⚙️ Upload security reports
79
76
uses : actions/upload-artifact@v4
@@ -82,16 +79,14 @@ jobs:
82
79
name : security-reports
83
80
path : |
84
81
bandit-report.json
85
- safety-report.json
86
82
retention-days : 30
87
83
88
84
89
- test :
90
- runs-on : ${{ matrix.os }}
85
+ test-ubuntu :
86
+ runs-on : ubuntu-latest
91
87
strategy :
92
88
fail-fast : false
93
89
matrix :
94
- os : [ubuntu-latest, windows-latest, macos-latest]
95
90
python-version : ["3.10", "3.11", "3.12", "3.13"]
96
91
97
92
services :
@@ -110,7 +105,6 @@ jobs:
110
105
uses : step-security/harden-runner@v2
111
106
with :
112
107
egress-policy : audit
113
- if : matrix.os == 'ubuntu-latest'
114
108
115
109
- name : ⚙️ Checkout the project
116
110
uses : actions/checkout@v4
@@ -139,7 +133,53 @@ jobs:
139
133
env :
140
134
REDIS_HOST : localhost
141
135
REDIS_PORT : 6379
142
- if : matrix.os != 'windows-latest'
136
+
137
+ - name : ⚙️ Upload coverage reports
138
+ uses : codecov/codecov-action@v4
139
+ if : matrix.python-version == '3.12'
140
+ with :
141
+ file : ./coverage.xml
142
+ flags : unittests
143
+ name : codecov-umbrella
144
+
145
+ test-other-os :
146
+ runs-on : ${{ matrix.os }}
147
+ strategy :
148
+ fail-fast : false
149
+ matrix :
150
+ os : [windows-latest, macos-latest]
151
+ python-version : ["3.10", "3.11", "3.12", "3.13"]
152
+
153
+ steps :
154
+ - name : ⚙️ Checkout the project
155
+ uses : actions/checkout@v4
156
+
157
+ - name : ⚙️ Install uv
158
+ uses : astral-sh/setup-uv@v4
159
+ with :
160
+ version : " latest"
161
+
162
+ - name : ⚙️ Set Python ${{ matrix.python-version }} up and add dependencies
163
+ run : |
164
+ uv python install ${{ matrix.python-version }}
165
+ uv sync --all-extras --dev
166
+ uv add --dev pytest pytest-cov pytest-asyncio coverage
167
+
168
+ - name : ⚙️ Run tests (without Redis services)
169
+ run : |
170
+ uv run pytest tests/ -v
171
+ env :
172
+ REDIS_HOST : localhost
173
+ REDIS_PORT : 6379
174
+
175
+ - name : ⚙️ Test MCP server startup (macOS)
176
+ run : |
177
+ brew install coreutils
178
+ gtimeout 10s uv run python src/main.py || test $? = 124
179
+ env :
180
+ REDIS_HOST : localhost
181
+ REDIS_PORT : 6379
182
+ if : matrix.os == 'macos-latest'
143
183
144
184
- name : ⚙️ Test MCP server startup (Windows)
145
185
run : |
@@ -149,18 +189,10 @@ jobs:
149
189
REDIS_PORT : 6379
150
190
if : matrix.os == 'windows-latest'
151
191
152
- - name : ⚙️ Upload coverage reports
153
- uses : codecov/codecov-action@v4
154
- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
155
- with :
156
- file : ./coverage.xml
157
- flags : unittests
158
- name : codecov-umbrella
159
-
160
192
161
193
build-test :
162
194
runs-on : ubuntu-latest
163
- needs : [lint-and-format, security-scan, test]
195
+ needs : [lint-and-format, security-scan, test-ubuntu, test-other-os ]
164
196
steps :
165
197
- name : ⚙️ Harden Runner
166
198
uses : step-security/harden-runner@v2
0 commit comments