Skip to content

Commit b402238

Browse files
authored
Merge branch 'aws:main' into main
2 parents c6b56ed + 220e3ef commit b402238

File tree

10 files changed

+54
-0
lines changed

10 files changed

+54
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conda-forge::mcp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conda-forge::mcp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conda-forge::mcp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
conda-forge::mcp
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG SAGEMAKER_DISTRIBUTION_IMAGE
2+
FROM $SAGEMAKER_DISTRIBUTION_IMAGE
3+
4+
ARG MAMBA_DOCKERFILE_ACTIVATE=1
5+
6+
RUN python -c "import mcp"
7+
8+
RUN git clone --recursive https://github.com/modelcontextprotocol/python-sdk.git && \
9+
:
10+
RUN micromamba install --freeze-installed -y pyright pytest uv ruff trio pytest-flakefinder pytest-xdist pytest-pretty inline-snapshot dirty-equals
11+
WORKDIR "python-sdk/"
12+
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_mcp_tests.sh .
13+
RUN chmod +x run_mcp_tests.sh
14+
15+
# Run tests in run_mcp_tests.sh
16+
CMD ["./run_mcp_tests.sh"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# We need to checkout the version of mcp python-sdk that is installed in the mamba environment.
4+
mcp_version=$(micromamba list | grep ' mcp ' | tr -s ' ' | cut -d ' ' -f 3)
5+
6+
# Checkout the corresponding mcp python-sdk version
7+
git checkout tags/v$mcp_version
8+
9+
pytest tests/server tests/issues tests/shared || exit $?
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
ARG SAGEMAKER_DISTRIBUTION_IMAGE
2+
FROM $SAGEMAKER_DISTRIBUTION_IMAGE
3+
4+
ARG MAMBA_DOCKERFILE_ACTIVATE=1
5+
6+
RUN python -c "import mcp"
7+
8+
RUN git clone --recursive https://github.com/modelcontextprotocol/python-sdk.git && \
9+
:
10+
RUN micromamba install --freeze-installed -y pyright pytest uv ruff trio pytest-flakefinder pytest-xdist pytest-pretty inline-snapshot dirty-equals
11+
WORKDIR "python-sdk/"
12+
COPY --chown=$MAMBA_USER:$MAMBA_USER scripts/run_mcp_tests.sh .
13+
RUN chmod +x run_mcp_tests.sh
14+
15+
# Run tests in run_mcp_tests.sh
16+
CMD ["./run_mcp_tests.sh"]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
# We need to checkout the version of mcp python-sdk that is installed in the mamba environment.
4+
mcp_version=$(micromamba list | grep ' mcp ' | tr -s ' ' | cut -d ' ' -f 3)
5+
6+
# Checkout the corresponding mcp python-sdk version
7+
git checkout tags/v$mcp_version
8+
9+
pytest tests/server tests/issues tests/shared || exit $?

0 commit comments

Comments
 (0)