Skip to content

Bring all remaining Starter MCP Servers from the arcade-mcp repo #60

Bring all remaining Starter MCP Servers from the arcade-mcp repo

Bring all remaining Starter MCP Servers from the arcade-mcp repo #60

Workflow file for this run

name: Test Servers
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
setup:
runs-on: ubuntu-latest
outputs:
servers_with_gha_secrets: ${{ steps.load_servers.outputs.servers_with_gha_secrets }}
servers_without_gha_secrets: ${{ steps.load_servers.outputs.servers_without_gha_secrets }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: determine servers with and without GHA secrets
id: load_servers
run: |
# Find all directories in servers/ that have a pyproject.toml
SERVERS=$(find servers -maxdepth 1 -type d -not -name "servers" -exec test -f {}/pyproject.toml \; -exec basename {} \; | jq -R -s -c 'split("\n")[:-1]')
SERVERS_WITH_GHA_SECRETS='[]'
SERVERS_WITHOUT_GHA_SECRETS=$(echo "$SERVERS" | jq -c --argjson with "$SERVERS_WITH_GHA_SECRETS" '[.[] | select(. as $t | $with | index($t) | not)]')
echo "Found servers: $SERVERS"
echo "Found servers without GHA secrets: $SERVERS_WITHOUT_GHA_SECRETS"
echo "Found servers with GHA secrets: $SERVERS_WITH_GHA_SECRETS"
echo "servers_without_gha_secrets=$SERVERS_WITHOUT_GHA_SECRETS" >> $GITHUB_OUTPUT
echo "servers_with_gha_secrets=$SERVERS_WITH_GHA_SECRETS" >> $GITHUB_OUTPUT
test-servers:
needs: setup
runs-on: ubuntu-latest
strategy:
matrix:
server: ${{ fromJson(needs.setup.outputs.servers_without_gha_secrets) }}
fail-fast: true
steps:
- name: Check out
uses: actions/checkout@v4
- name: Checkout arcade-mcp
run: |
cd ..
git clone https://github.com/ArcadeAI/arcade-mcp.git
- name: Set up the environment
uses: ./.github/actions/setup-uv-env
with:
working-directory: ../arcade-mcp
- name: Install server dependencies
working-directory: servers/${{ matrix.server }}
run: uv pip install --pre -e ".[dev]"
- name: Check server
working-directory: servers/${{ matrix.server }}
run: |
uv run --active pre-commit run -a
uv run --active mypy --config-file=pyproject.toml
- name: Test stand-alone servers (no secrets)
working-directory: servers/${{ matrix.server }}
run: |
# Run pytest and capture exit code
uv run --active pytest -W ignore -v --cov=arcade_${{ matrix.server }} --cov-report=xml || EXIT_CODE=$?
if [ "${EXIT_CODE:-0}" -eq 5 ]; then
echo "No tests found for server ${{ matrix.server }}, skipping..."
exit 0
elif [ "${EXIT_CODE:-0}" -ne 0 ]; then
exit ${EXIT_CODE}
fi
test-servers-with-gha-secrets:
needs: setup
runs-on: ubuntu-latest
if: ${{ needs.setup.outputs.servers_with_gha_secrets != '[]' }}
strategy:
matrix:
server: ${{ fromJson(needs.setup.outputs.servers_with_gha_secrets) }}
fail-fast: true
steps:
- name: Check out
uses: actions/checkout@v4
- name: Checkout arcade-mcp
run: |
cd ..
git clone https://github.com/ArcadeAI/arcade-mcp.git
- name: Set up the environment
uses: ./.github/actions/setup-uv-env
with:
working-directory: ../arcade-mcp
- name: Install server dependencies
working-directory: servers/${{ matrix.server }}
run: uv pip install -e ".[dev]"
- name: Check server
working-directory: servers/${{ matrix.server }}
run: |
uv run --active pre-commit run -a
uv run --active mypy --config-file=pyproject.toml
- name: Test stand-alone servers (with secrets)
if: |
!github.event.pull_request.head.repo.fork
working-directory: servers/${{ matrix.server }}
env:
TEST_POSTGRES_DATABASE_CONNECTION_STRING: ${{ secrets.TEST_POSTGRES_DATABASE_CONNECTION_STRING }} # TODO: dynamically only load the `TEST_${{ matrix.server }}_DATABASE_CONNECTION_STRING secret`
run: |
# Run pytest and capture exit code
uv run --active pytest -W ignore -v --cov=arcade_${{ matrix.server }} --cov-report=xml || EXIT_CODE=$?
if [ "${EXIT_CODE:-0}" -eq 5 ]; then
echo "No tests found for server ${{ matrix.server }}, skipping..."
exit 0
elif [ "${EXIT_CODE:-0}" -ne 0 ]; then
exit ${EXIT_CODE}
fi