42
42
run : |
43
43
uv run ruff check src/ tests/
44
44
uv run ruff format --check src/ tests/
45
- uv run mypy src/ --ignore-missing-imports
45
+ # uv run mypy src/ --ignore-missing-imports
46
46
47
47
48
48
security-scan :
@@ -82,12 +82,11 @@ jobs:
82
82
retention-days : 30
83
83
84
84
85
- test :
86
- runs-on : ${{ matrix.os }}
85
+ test-ubuntu :
86
+ runs-on : ubuntu-latest
87
87
strategy :
88
88
fail-fast : false
89
89
matrix :
90
- os : [ubuntu-latest, windows-latest, macos-latest]
91
90
python-version : ["3.10", "3.11", "3.12", "3.13"]
92
91
93
92
services :
@@ -106,7 +105,6 @@ jobs:
106
105
uses : step-security/harden-runner@v2
107
106
with :
108
107
egress-policy : audit
109
- if : matrix.os == 'ubuntu-latest'
110
108
111
109
- name : ⚙️ Checkout the project
112
110
uses : actions/checkout@v4
@@ -135,7 +133,52 @@ jobs:
135
133
env :
136
134
REDIS_HOST : localhost
137
135
REDIS_PORT : 6379
138
- 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
+ timeout 10s uv run python src/main.py || test $? = 124
178
+ env :
179
+ REDIS_HOST : localhost
180
+ REDIS_PORT : 6379
181
+ if : matrix.os == 'macos-latest'
139
182
140
183
- name : ⚙️ Test MCP server startup (Windows)
141
184
run : |
@@ -145,18 +188,10 @@ jobs:
145
188
REDIS_PORT : 6379
146
189
if : matrix.os == 'windows-latest'
147
190
148
- - name : ⚙️ Upload coverage reports
149
- uses : codecov/codecov-action@v4
150
- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
151
- with :
152
- file : ./coverage.xml
153
- flags : unittests
154
- name : codecov-umbrella
155
-
156
191
157
192
build-test :
158
193
runs-on : ubuntu-latest
159
- needs : [lint-and-format, security-scan, test]
194
+ needs : [lint-and-format, security-scan, test-ubuntu, test-other-os ]
160
195
steps :
161
196
- name : ⚙️ Harden Runner
162
197
uses : step-security/harden-runner@v2
0 commit comments