Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: CI
on:
pull_request: {}

env:
MAVEN_ARGS: --no-transfer-progress

jobs:
build:
name: Build and Test
Expand All @@ -19,7 +22,7 @@ jobs:
cache: 'maven'

- name: Build
run: mvn verify
run: ./mvnw verify

jackson2-tests:
name: Jackson 2 Integration Tests
Expand All @@ -36,4 +39,4 @@ jobs:
cache: 'maven'

- name: Jackson 2 Integration Tests
run: mvn -pl mcp-test -am -Pjackson2 test
run: ./mvnw -pl mcp-test -am -Pjackson2 test
17 changes: 12 additions & 5 deletions .github/workflows/conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ on:
branches: [main]
workflow_dispatch:

env:
MAVEN_ARGS: --no-transfer-progress

jobs:
server:
if: ${{ github.repository_owner == 'modelcontextprotocol' }}
name: Server Conformance
runs-on: ubuntu-latest
steps:
Expand All @@ -20,10 +24,11 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Build and start server
- name: Build
run: ./mvnw clean install -DskipTests
- name: Start server
run: |
mvn clean install -DskipTests
mvn exec:java -pl conformance-tests/server-servlet -Dexec.mainClass="io.modelcontextprotocol.conformance.server.ConformanceServlet" &
./mvnw exec:java -pl conformance-tests/server-servlet -Dexec.mainClass="io.modelcontextprotocol.conformance.server.ConformanceServlet" &
timeout 30 bash -c 'until curl -s http://localhost:8080/mcp > /dev/null 2>&1; do sleep 0.5; done'

- name: Run conformance tests
Expand All @@ -35,6 +40,7 @@ jobs:
expected-failures: ./conformance-tests/conformance-baseline.yml

client:
if: ${{ github.repository_owner == 'modelcontextprotocol' }}
name: Client Conformance
runs-on: ubuntu-latest
strategy:
Expand All @@ -51,7 +57,7 @@ jobs:
cache: 'maven'

- name: Build client
run: mvn clean install -DskipTests
run: ./mvnw clean install -DskipTests -T 1C

- name: Run conformance test
uses: modelcontextprotocol/conformance@v0.1.11
Expand All @@ -62,6 +68,7 @@ jobs:
expected-failures: ./conformance-tests/conformance-baseline.yml

auth:
if: ${{ github.repository_owner == 'modelcontextprotocol' }}
name: Auth Conformance
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -92,7 +99,7 @@ jobs:
cache: 'maven'

- name: Build client
run: mvn clean install -DskipTests
run: ./mvnw clean install -DskipTests

- name: Run conformance test
uses: modelcontextprotocol/conformance@v0.1.15
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ on:
permissions:
contents: write

env:
MAVEN_ARGS: --no-transfer-progress

jobs:
deploy:
if: ${{ github.repository_owner == 'modelcontextprotocol' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -37,7 +41,7 @@ jobs:
- name: Deploy docs (push to main)
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout)
PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version --quiet -DforceStdout)
if [[ "${PROJECT_VERSION}" == *-SNAPSHOT ]]; then
ALIAS="latest-snapshot"
else
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/maven-central-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Release to Maven Central
on:
workflow_dispatch:

env:
MAVEN_ARGS: --no-transfer-progress

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -27,14 +30,14 @@ jobs:
node-version: '20'

- name: Jackson 2 Integration Tests
run: mvn -pl mcp-test -am -Pjackson2 test
run: ./mvnw -pl mcp-test -am -Pjackson2 test

- name: Build and Test
run: mvn clean verify
run: ./mvnw clean verify

- name: Publish to Maven Central
run: |
mvn --batch-mode \
./mvnw --batch-mode \
-Prelease \
-Pjavadoc \
deploy
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ on:
push:
branches: [ "main" ]

env:
MAVEN_ARGS: --no-transfer-progress

jobs:
build:
if: ${{ github.repository_owner == 'modelcontextprotocol' }}
name: Build branch
runs-on: ubuntu-latest
steps:
Expand All @@ -30,18 +34,18 @@ jobs:
node-version: '20'

- name: Generate Java docs
run: mvn -Pjavadoc -B javadoc:aggregate
run: ./mvnw -Pjavadoc -B javadoc:aggregate

- name: Jackson 2 Integration Tests
run: mvn -pl mcp-test -am -Pjackson2 test
run: ./mvnw -pl mcp-test -am -Pjackson2 test

- name: Build with Maven and deploy to Sonatype snapshot repository
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
run: |
mvn -Pjavadoc -Prelease --batch-mode --update-snapshots deploy
./mvnw -Pjavadoc -Prelease --batch-mode --update-snapshots deploy

- name: Capture project version
run: echo PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV
run: echo PROJECT_VERSION=$(./mvnw help:evaluate -Dexpression=project.version --quiet -DforceStdout) >> $GITHUB_ENV