-
Notifications
You must be signed in to change notification settings - Fork 366
feat(setup): add PostHog funnel telemetry #1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1da45ff
049014f
5b186f9
0564ef8
7f491c1
f3c8a64
43417ab
f970c91
ccfd146
c3a1928
b3e68f9
5cfc6d1
7a2ff66
fe832d5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: Setup wizard verification | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'packages/setupWizard/**' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: When a PR changes root Yarn configuration or workspace metadata, the setup CLI has no test gate because this workflow does not trigger and Prompt for AI agents |
||
| - 'packages/schemas/**' | ||
| - 'entrypoint.sh' | ||
| - 'yarn.lock' | ||
| - '.github/workflows/setup-wizard-e2e.yml' | ||
| - '.github/workflows/release-setup-sourcebot.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| platform: | ||
| timeout-minutes: 20 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| node: ['20.20.0', '22.22.0', '24.x'] | ||
| runs-on: ${{ matrix.os }} | ||
| env: | ||
| PACKAGE_TRACKER_ANALYTICS: 'false' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '24.x' | ||
| - run: corepack enable | ||
| - run: yarn install --immutable --mode=skip-build | ||
| - run: yarn rebuild node-pty | ||
| - run: yarn workspace @sourcebot/schemas build | ||
| - run: yarn workspace setup-sourcebot build | ||
| - name: Pack on the release runtime | ||
| shell: bash | ||
| env: | ||
| SETUP_TEST_TARBALL: ${{ runner.temp }}/setup-sourcebot.tgz | ||
| run: | | ||
| yarn workspace setup-sourcebot pack --out "$SETUP_TEST_TARBALL" | ||
| echo "SETUP_TEST_TARBALL=$SETUP_TEST_TARBALL" >> "$GITHUB_ENV" | ||
| - name: Select end-user test runtime | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
| - run: corepack enable | ||
| - run: yarn workspace setup-sourcebot test | ||
| - run: yarn workspace setup-sourcebot test:platform | ||
| - name: Linux minimum-runtime regression checks | ||
| if: runner.os == 'Linux' && matrix.node != '24.x' | ||
| working-directory: packages/setupWizard | ||
| run: node --test --test-concurrency=1 tests/e2e/wizard.test.mjs tests/e2e/collectors.test.mjs tests/e2e/docker.test.mjs tests/e2e/safety.test.mjs | ||
| - name: Linux packed-artifact and runtime checks | ||
| if: runner.os == 'Linux' && matrix.node == '24.x' | ||
| run: | | ||
| docker pull docker.sourcebot.dev/sourcebot-dev/sourcebot:latest | ||
| yarn workspace setup-sourcebot test:e2e | ||
| yarn workspace setup-sourcebot test:baseline | ||
| node packages/setupWizard/tests/e2e/packageManagers.mjs | ||
|
|
||
| setup-wizard-e2e: | ||
| if: always() | ||
| needs: [platform] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Require every platform job | ||
| env: | ||
| RESULT: ${{ needs.platform.result }} | ||
| run: test "$RESULT" = success | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -41,4 +41,6 @@ jobs: | |||||
| run: yarn install --frozen-lockfile | ||||||
|
|
||||||
| - name: Test | ||||||
| run: yarn test | ||||||
| # The CLI has separate packed-artifact and Node-compatibility gates in setup-wizard-e2e. | ||||||
| # Keep the application workspaces on their existing runtime here. | ||||||
| run: yarn workspaces foreach --all --topological --exclude setup-sourcebot --exclude 'root-workspace-*' run test | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: The root workspace is not excluded here because its Yarn candidate name is exactly Prompt for AI agents
Suggested change
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env node | ||
| // Intersection of posthog-node and @inquirer/prompts runtime requirements. | ||
| const [major, minor] = process.versions.node.split('.').map(Number); | ||
| const supported = (major === 20 && minor >= 20) || | ||
| (major === 22 && minor >= 22) || (major === 23 && minor >= 5) || major >= 24; | ||
| if (!supported) { | ||
| console.error('setup-sourcebot requires Node.js 20.20+, 22.22+, or 23.5+ (including Node.js 24+). Please upgrade Node.js.'); | ||
| process.exitCode = 1; | ||
| } else { | ||
| import('./dist/index.js').catch(() => { | ||
| console.error('Unable to start setup-sourcebot. Please reinstall the package.'); | ||
| process.exitCode = 1; | ||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: This release-gating step runs the full e2e suite (booting 8+ real Sourcebot Docker containers in runtime.test.mjs) plus test:node-compatibility, which downloads Node 18.20.8/20.19.0/20.20.0/22.21.0/22.22.0 runtimes over npm and re-runs the whole unit/integration/e2e suite on two of them. Neither the step nor the job sets timeout-minutes, so a slow registry, long image pull, or hung container holds the step at the 360-minute default; with
cancel-in-progress: falsea stuck run also blocks subsequent releases in the group. The repo already caps the identical suite at 20 minutes in setup-wizard-e2e.yml (timeout-minutes: 20). Add a sensible timeout-minutes to this step or job.Prompt for AI agents