Skip to content

Commit 3ae0b5b

Browse files
author
root
committed
Fix CI: Correct MCP module import and setup
1 parent 4bb4f72 commit 3ae0b5b

File tree

1 file changed

+13
-32
lines changed

1 file changed

+13
-32
lines changed

.github/workflows/shared.yml

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,6 @@ on:
44
workflow_call:
55

66
jobs:
7-
format:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
12-
- name: Install uv
13-
uses: astral-sh/setup-uv@v3
14-
with:
15-
enable-cache: true
16-
17-
- name: Install the project
18-
run: uv sync --frozen --all-extras --dev --python 3.13
19-
20-
- name: Run ruff format check
21-
run: uv run --no-sync ruff check .
22-
23-
typecheck:
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v4
27-
28-
- name: Install uv
29-
uses: astral-sh/setup-uv@v3
30-
with:
31-
enable-cache: true
32-
33-
- name: Install the project
34-
run: uv sync --frozen --all-extras --dev --python 3.13
35-
36-
- name: Run pyright
37-
run: uv run --no-sync pyright
38-
397
test:
408
runs-on: ubuntu-latest
419
strategy:
@@ -45,6 +13,9 @@ jobs:
4513
steps:
4614
- uses: actions/checkout@v4
4715

16+
- name: Clear UV Cache (if exists)
17+
run: uv cache clear || true
18+
4819
- name: Install uv
4920
uses: astral-sh/setup-uv@v3
5021
with:
@@ -62,10 +33,20 @@ jobs:
6233
run: |
6334
uv run --no-sync python -m pip install python-jose types-python-jose
6435
36+
- name: Install local mcp package
37+
run: |
38+
uv run --no-sync pip install -e ./src
39+
6540
- name: Verify installation
6641
run: uv run --no-sync python -m pip list
6742

43+
- name: Set Python Path for MCP
44+
run: echo "PYTHONPATH=$PYTHONPATH:$(pwd)/src" >> $GITHUB_ENV
45+
6846
- name: Run pytest
47+
env:
48+
PYTHONPATH: ${{ env.PYTHONPATH }}
6949
run: uv run --no-sync pytest
7050

7151

52+

0 commit comments

Comments
 (0)