Skip to content

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects #5814

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects

[storage/journal/authenticated] Ensure Stale Batch Has No Side Effects #5814

Workflow file for this run

name: MCP
on:
push:
branches: ["main"]
pull_request:
merge_group:
permissions:
contents: read
concurrency:
group: mcp-${{ github.head_ref || github.ref_name || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
defaults:
run:
working-directory: mcp
jobs:
Lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: mcp/package-lock.json
- name: Install dependencies
run: npm ci
- name: Check formatting
run: npm run format:check
- name: Lint
run: npm run lint
Build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: mcp/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
Test:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: mcp/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
Lock:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: mcp/package-lock.json
- name: Install dependencies
run: npm ci
- name: Check package-lock.json unchanged
run: |
if ! git diff --exit-code package-lock.json; then
echo "ERROR: package-lock.json was modified during install!"
echo "This suggests that the package-lock.json file in the repository is not up to date."
echo "Please run 'npm install' locally and commit the updated package-lock.json."
exit 1
fi
echo "✓ package-lock.json remained unchanged after npm ci"
Integration:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: mcp/package-lock.json
- name: Install dependencies
run: npm ci
- name: Create local D1 database
run: |
npx wrangler d1 execute commonware-mcp-search --local --file=migrations/0001_create_search_index.sql
- name: Start wrangler dev server
run: |
npx wrangler dev --test-scheduled --port 8787 &
echo "Waiting for server to start..."
for i in {1..30}; do
if curl -s http://localhost:8787/health > /dev/null 2>&1; then
echo "Server is ready"
exit 0
fi
sleep 1
done
echo "ERROR: Server failed to start within 30 seconds"
exit 1
- name: Run integration tests
run: node integration-test.mjs