Skip to content

Fix CI: build stratus-sdk before mcp-aws typecheck #31

Fix CI: build stratus-sdk before mcp-aws typecheck

Fix CI: build stratus-sdk before mcp-aws typecheck #31

Workflow file for this run

name: CI
on:
push:
branches: [main]
permissions:
contents: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: bun install --frozen-lockfile
- name: Build stratus-sdk (needed for mcp-aws typecheck)
run: bun run --filter stratus-sdk build
- name: Typecheck stratus-sdk
run: bunx tsc -p packages/stratus-sdk/tsconfig.build.json --noEmit
- name: Typecheck mcp-aws
run: bunx tsc -p packages/mcp-aws/tsconfig.json --noEmit
- name: Test stratus-sdk
run: bun test packages/stratus-sdk/tests/core packages/stratus-sdk/tests/azure
- name: Test mcp-aws
working-directory: packages/mcp-aws
run: |
bun test --timeout 15000 \
tests/errors.test.ts tests/auth/ tests/gating/ \
tests/session/memory.test.ts tests/session/dynamo.test.ts tests/session/sqlite.test.ts \
tests/disclosure/ tests/server.test.ts tests/codemode/ \
tests/context.test.ts tests/ssrf.test.ts tests/events.test.ts \
tests/compose.test.ts tests/edge-cases.test.ts tests/bun-transport.test.ts \
tests/integration/disclosure.test.ts tests/integration/mcp-protocol-roundtrip.test.ts \
tests/integration/e2e-server.test.ts tests/integration/prd-user-stories.test.ts \
tests/integration/lambda-jsonrpc.test.ts tests/integration/playwright-aws-deploy.test.ts
- name: Build
run: bun run --filter '*' build
- name: Release stratus-sdk if version is new
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/stratus-sdk
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="v$VERSION"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists, skipping"
else
echo "Creating release $TAG"
gh release create "$TAG" --title "$TAG" --generate-notes
echo "Publishing stratus-sdk@$VERSION to npm"
npm publish --access public
fi
- name: Release mcp-aws if version is new
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/mcp-aws
run: |
VERSION=$(node -p "require('./package.json').version")
TAG="mcp-aws-v$VERSION"
if gh release view "$TAG" >/dev/null 2>&1; then
echo "Release $TAG already exists, skipping"
else
echo "Creating release $TAG"
gh release create "$TAG" --title "@stratus/mcp-aws $VERSION" --generate-notes
echo "Publishing @stratus/mcp-aws@$VERSION to npm"
npm publish --access public
fi