Skip to content
Merged
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
15 changes: 4 additions & 11 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
name: E2E CLI Tests

on:
workflow_run:
workflows: ["Publish Alpha"]
types:
- completed
branches:
- main
workflow_call:

jobs:
e2e-test:
# Only run if publish-alpha succeeded
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -47,7 +40,7 @@ jobs:
- name: Deploy
id: deploy
working-directory: test-mcp-app
run: leanmcp deploy . --yes --subdomain ci-test-${{ github.event.workflow_run.id }}
run: leanmcp deploy . --yes --subdomain ci-test-${{ github.run_id }}

# 6. Verify URL
- name: Verify URL
Expand All @@ -68,12 +61,12 @@ jobs:
working-directory: test-mcp-app
run: leanmcp deploy . --yes

# 9. Verify URL after update
# 9. Verify URL after update (with delay for propagation)
- name: Verify URL After Update
working-directory: test-mcp-app
run: |
URL=$(cat .leanmcp/config.json | jq -r '.url')
curl -f "$URL" --retry 3 --retry-delay 5
curl -f "$URL" --retry 5 --retry-delay 5 --retry-all-errors

# 10. Health Check after update
- name: Health Check After Update
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
publish-alpha:
# Run on main push OR PRs from KushagraAgarwal525
if: |
github.event_name == 'push' ||
github.event.pull_request.user.login == 'KushagraAgarwal525'
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -135,3 +142,8 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SHORT_SHA: ${{ steps.sha.outputs.short }}

call-e2e:
needs: publish-alpha
uses: ./.github/workflows/e2e-tests.yml
secrets: inherit
7 changes: 5 additions & 2 deletions packages/cli/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ async function runTypeScriptCompiler(cwd: string): Promise<void> {
await execa('npx', ['tsc'], {
cwd,
preferLocal: true,
all: true, // Combine stdout + stderr into error.all
// Must use 'pipe' to capture output (default 'inherit' doesn't capture)
stdout: 'pipe',
stderr: 'pipe',
all: true, // Combine stdout + stderr into result.all
});
} catch (error: any) {
// execa includes full output in error.all
// execa includes full output in error.all when piped
const output = error.all || error.stdout || error.stderr || error.message;
throw new Error(output || `tsc exited with code ${error.exitCode}`);
}
Expand Down
Loading