@@ -36,14 +36,13 @@ jobs:
3636 run : |
3737 uv python install 3.12
3838 uv sync --all-extras --dev
39- uv add --dev ruff isort mypy
39+ uv add --dev ruff mypy
4040
4141 - name : ⚙️ Run linters and formatters
4242 run : |
4343 uv run ruff check src/ tests/
4444 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
4746
4847
4948 security-scan :
@@ -66,14 +65,12 @@ jobs:
6665 run : |
6766 uv python install 3.12
6867 uv sync --all-extras --dev
69- uv add --dev bandit safety
68+ uv add --dev bandit
7069
7170 - name : ⚙️ Run security scan with bandit
7271 run : |
7372 uv run bandit -r src/ -f json -o bandit-report.json || true
7473 uv run bandit -r src/
75- uv run safety check --output json > safety-report.json || true
76- uv run safety check
7774
7875 - name : ⚙️ Upload security reports
7976 uses : actions/upload-artifact@v4
@@ -82,16 +79,14 @@ jobs:
8279 name : security-reports
8380 path : |
8481 bandit-report.json
85- safety-report.json
8682 retention-days : 30
8783
8884
89- test :
90- runs-on : ${{ matrix.os }}
85+ test-ubuntu :
86+ runs-on : ubuntu-latest
9187 strategy :
9288 fail-fast : false
9389 matrix :
94- os : [ubuntu-latest, windows-latest, macos-latest]
9590 python-version : ["3.10", "3.11", "3.12", "3.13"]
9691
9792 services :
@@ -110,7 +105,6 @@ jobs:
110105 uses : step-security/harden-runner@v2
111106 with :
112107 egress-policy : audit
113- if : matrix.os == 'ubuntu-latest'
114108
115109 - name : ⚙️ Checkout the project
116110 uses : actions/checkout@v4
@@ -139,7 +133,53 @@ jobs:
139133 env :
140134 REDIS_HOST : localhost
141135 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'
143183
144184 - name : ⚙️ Test MCP server startup (Windows)
145185 run : |
@@ -149,18 +189,10 @@ jobs:
149189 REDIS_PORT : 6379
150190 if : matrix.os == 'windows-latest'
151191
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-
160192
161193 build-test :
162194 runs-on : ubuntu-latest
163- needs : [lint-and-format, security-scan, test]
195+ needs : [lint-and-format, security-scan, test-ubuntu, test-other-os ]
164196 steps :
165197 - name : ⚙️ Harden Runner
166198 uses : step-security/harden-runner@v2
0 commit comments