-
Notifications
You must be signed in to change notification settings - Fork 0
Package distribution + installer + hardened Daytona/OpenCode E2E #6
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Daytona E2E | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| repo_url: | ||
| description: "Repository URL to analyze" | ||
| required: false | ||
| default: "https://github.com/octocat/Hello-World" | ||
| model: | ||
| description: "Model to use" | ||
| required: false | ||
| default: "zai-coding-plan/glm-4.7-flash" | ||
| analyze_timeout_sec: | ||
| description: "Analyze timeout seconds" | ||
| required: false | ||
| default: "600" | ||
| install_timeout_sec: | ||
| description: "Install timeout seconds" | ||
| required: false | ||
| default: "300" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| DAYTONA_API_KEY: ${{ secrets.DAYTONA_API_KEY }} | ||
| DAYTONA_API_URL: ${{ vars.DAYTONA_API_URL }} | ||
| ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }} | ||
|
|
||
| jobs: | ||
| E2E: | ||
| name: Run Daytona Analyze E2E | ||
| runs-on: blacksmith-8vcpu-ubuntu-2404 | ||
| timeout-minutes: 45 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: 1.3.8 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Validate required environment | ||
| run: | | ||
| if [ -z "${DAYTONA_API_KEY:-}" ]; then | ||
| echo "DAYTONA_API_KEY is required" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Run analyze e2e | ||
| run: | | ||
| mkdir -p .memory/daytona-e2e | ||
| bun run analyze -- \ | ||
| --out-dir .memory/daytona-e2e/findings \ | ||
| --model "${{ inputs.model }}" \ | ||
| --install-timeout-sec "${{ inputs.install_timeout_sec }}" \ | ||
| --analyze-timeout-sec "${{ inputs.analyze_timeout_sec }}" \ | ||
| "${{ inputs.repo_url }}" | ||
|
|
||
| - name: Upload findings artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: daytona-e2e-findings | ||
| path: .memory/daytona-e2e/findings | ||
| if-no-files-found: error | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| name: Publish Package | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
|
|
||
| jobs: | ||
| Publish: | ||
| name: Publish To GitHub Packages | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: 1.3.8 | ||
|
|
||
| - name: Install dependencies | ||
| run: bun install --frozen-lockfile | ||
|
|
||
| - name: Validate package | ||
| run: | | ||
| bun run check | ||
| bun run typecheck | ||
| bun test | ||
| bun run build | ||
|
|
||
| - name: Publish package | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: npm publish --registry https://npm.pkg.github.com | ||
|
|
||
| VerifyInstall: | ||
| name: Verify Registry Install | ||
| runs-on: blacksmith-4vcpu-ubuntu-2404 | ||
| needs: Publish | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
|
|
||
| - name: Configure npm for GitHub Packages | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| npm config set @shpitdev:registry https://npm.pkg.github.com | ||
| npm config set //npm.pkg.github.com/:_authToken "$NODE_AUTH_TOKEN" | ||
| npm config set always-auth true | ||
|
|
||
| - name: Install published package | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| PACKAGE_NAME=$(node -p "require('./package.json').name") | ||
| PACKAGE_VERSION=$(node -p "require('./package.json').version") | ||
| PACKAGE_REF="${PACKAGE_NAME}@${PACKAGE_VERSION}" | ||
|
|
||
| mkdir -p e2e-install | ||
| cd e2e-install | ||
| npm init -y | ||
|
|
||
| for attempt in 1 2 3 4 5 6; do | ||
| if npm install "$PACKAGE_REF"; then | ||
| break | ||
| fi | ||
| if [ "$attempt" -eq 6 ]; then | ||
| echo "Failed to install $PACKAGE_REF after retries" >&2 | ||
| exit 1 | ||
| fi | ||
| sleep 10 | ||
| done | ||
|
|
||
| - name: Run installed CLI binaries | ||
| run: | | ||
| cd e2e-install | ||
| ./node_modules/.bin/opencode-sandboxed-research-analyze --help | ||
| ./node_modules/.bin/opencode-sandboxed-research-start --help | ||
| ./node_modules/.bin/opencode-sandboxed-research-setup --help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,7 @@ node_modules/ | |
| dist/ | ||
| coverage/ | ||
| .turbo/ | ||
| .memory/ | ||
|
|
||
| # Logs | ||
| *.log | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| !.memory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #!/usr/bin/env node | ||
| import "../dist/analyze-repos.js"; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.