Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 17, 2026

Adds integration test to verify the complete offckb create workflow (create → build → deploy) works correctly on all CI platforms.

Changes

  • scripts/create-test.sh: New bash script that:

    • Starts devnet node and waits for RPC readiness
    • Creates test project with --no-interactive --no-git --no-install flags
    • Verifies essential files (package.json, contracts, tests, deployment configs)
    • Installs dependencies explicitly for deterministic behavior
    • Builds and deploys project to running devnet
    • Validates deployment artifacts and runs mock tests
    • Cleanup via trap handlers (stops node, removes temp files)
  • .github/workflows/test.yml: Added integration test step after existing node start test

Test execution

# Creates unique test project in /tmp
pnpm start create "test-project-$$" \
  --no-interactive \
  --no-git \
  --no-install \
  -l typescript \
  -c hello-world

# Explicit dependency install for determinism
pnpm install --frozen-lockfile || pnpm install

# Verifies full workflow
pnpm run build
pnpm run deploy
pnpm run test -- hello-world.mock.test.ts

Pattern follows existing starting-node-test.sh. Runs on Ubuntu, Windows, macOS.

Original prompt

This section details on the original issue you should resolve

<issue_title>Add a ci test for offckb create</issue_title>
<issue_description>Currently there is a integration test in the test.yml ci which will start pnpm start node and then curl the JSON RPC to make sure the devent is successfully launching. A similar ci test is required to make sure the offckb create command works fine on main platforms.

Note that to test the complete function of offckb create, you need to check the command implementations. And for integration test, you need to start a devnet node first using pnpm start node in the background and then create the boilerplate project(you might want to pass yes option to jump the confirm input on terminal) and doing build and deploy command to make sure the full workflow is good.

The test should be a bash script under scripts folder, similar to the previous node starting test.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits January 17, 2026 03:38
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CI test for offckb create command Add CI integration test for offckb create command Jan 17, 2026
Copilot AI requested a review from RetricSu January 17, 2026 03:45
@RetricSu RetricSu marked this pull request as ready for review January 19, 2026 02:26
@RetricSu RetricSu merged commit 4317f9b into develop Jan 19, 2026
1 of 4 checks passed
@RetricSu RetricSu deleted the copilot/add-ci-test-for-offckb-create branch January 19, 2026 02:27
Copilot AI added a commit that referenced this pull request Jan 19, 2026
* Initial plan

* Add create-test.sh integration test script and update CI workflow

Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>

* Fix create-test.sh to install dependencies during project creation

Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>

* Address code review feedback: make test more deterministic and explicit

Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>

* Improve test script readability and error messaging

Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>

* fix create test script cd

* add ckb-debugger install in ci

* fix(ci): create test install offckb

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: RetricSu <23436060+RetricSu@users.noreply.github.com>
Co-authored-by: RetricSu <inneverland2013@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a ci test for offckb create

2 participants