-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(examples): add CodeBuddy Code CLI integration example(refs #644 ) #996
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
2fa0a4c
e1b13fa
eba03f5
82657fe
3b4abd2
2cc075c
7b77eaa
7070730
4840153
da1cc65
392e564
c0d2152
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,70 @@ | |||||||||||||||||
| # Copyright (c) 2026 Tencent Inc. | |||||||||||||||||
| # SPDX-License-Identifier: Apache-2.0 | |||||||||||||||||
|
|
|||||||||||||||||
| name: codebuddy-integration | |||||||||||||||||
|
|
|||||||||||||||||
| on: | |||||||||||||||||
| pull_request: | |||||||||||||||||
| paths: | |||||||||||||||||
| - "examples/codebuddy-integration/**" | |||||||||||||||||
| - "docs/**/integrations/codebuddy.md" | |||||||||||||||||
| - ".github/workflows/codebuddy-integration.yml" | |||||||||||||||||
| push: | |||||||||||||||||
| branches: [main] | |||||||||||||||||
|
|
|||||||||||||||||
| jobs: | |||||||||||||||||
| static: | |||||||||||||||||
| name: Static checks (compile + unit tests) | |||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||
| steps: | |||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Set up Python | |||||||||||||||||
| uses: actions/setup-python@v5 | |||||||||||||||||
| with: | |||||||||||||||||
| python-version: "3.11" | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Compile host driver scripts | |||||||||||||||||
| working-directory: examples/codebuddy-integration | |||||||||||||||||
| run: | | |||||||||||||||||
| python3 -m py_compile env_utils.py _codebuddy_common.py \ | |||||||||||||||||
| run_codebuddy.py resume_codebuddy.py network_policy.py | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Run env_utils unit tests | |||||||||||||||||
| working-directory: examples/codebuddy-integration | |||||||||||||||||
| run: python3 -m unittest discover -s . -p test_env_utils.py -v | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Smoke-check --help output | |||||||||||||||||
| working-directory: examples/codebuddy-integration | |||||||||||||||||
| run: | | |||||||||||||||||
| python3 run_codebuddy.py --help | |||||||||||||||||
| python3 resume_codebuddy.py --help | |||||||||||||||||
|
pei-pei45 marked this conversation as resolved.
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. Critical: CI test discovery silently skips 3 out of 4 test files The CI uses
Only ~752 lines of Fix: Change to |
|||||||||||||||||
| python3 network_policy.py --help | |||||||||||||||||
|
|
|||||||||||||||||
| dockerfile: | |||||||||||||||||
| name: Dockerfile builds cleanly | |||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||
| steps: | |||||||||||||||||
| - uses: actions/checkout@v4 | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Set up Buildx | |||||||||||||||||
| uses: docker/setup-buildx-action@v3 | |||||||||||||||||
|
|
|||||||||||||||||
| - name: Build (cache miss is fine; --load is just for smoke) | |||||||||||||||||
| uses: docker/build-push-action@v6 | |||||||||||||||||
| with: | |||||||||||||||||
| context: examples/codebuddy-integration | |||||||||||||||||
| push: false | |||||||||||||||||
| load: true | |||||||||||||||||
| tags: codebuddy-cube:ci | |||||||||||||||||
| cache-from: type=gha | |||||||||||||||||
| cache-to: type=gha,mode=max | |||||||||||||||||
|
|
|||||||||||||||||
| - name: codebuddy --version inside the image | |||||||||||||||||
| run: | | |||||||||||||||||
| cid=$(docker run -d --rm codebuddy-cube:ci) | |||||||||||||||||
| docker exec "$cid" codebuddy --version | |||||||||||||||||
| # envd /health reachable means the readiness probe will succeed | |||||||||||||||||
| docker exec "$cid" curl -fsS -o /dev/null \ | |||||||||||||||||
|
pei-pei45 marked this conversation as resolved.
Outdated
|
|||||||||||||||||
| http://127.0.0.1:49983/health | |||||||||||||||||
| docker rm -f "$cid" | |||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.