Skip to content

ci: cover build/test and add standalone quickstart - #8

Merged
colmugx merged 3 commits into
mainfrom
chore/ci-quickstart-readme
Oct 15, 2026
Merged

colmugx merged 3 commits into
mainfrom
chore/ci-quickstart-readme

Conversation

@colmugx

@colmugx colmugx commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Why

The existing pull-request workflow only ran moon check for native and JS. The library had comprehensive API documentation and tests, but no independently runnable consumer example and no concise installation instructions.

What changed

  • Extend the PR workflow to run on push, pull_request, and manual dispatch:
    • native moon check, moon build, moon test;
    • JS moon check and moon build;
    • native check/build/test/run for a standalone quickstart.
  • Add examples/quickstart/, modeled after Posoco's standalone quickstart, with its own moon.mod, moon.pkg, moon.work, executable counter and focused test.
  • Add only installation and executable quickstart sections to README.mbt.md, leaving existing API and behavior documentation unchanged.
  • Keep production implementation, API signatures, and the existing concurrency benchmark workflow untouched.

Result and verification

The quickstart exercises real public Fuwaroid::spawn, tell, ask, close and join APIs and expects count = 5.

Validation status: source/API review completed; local MoonBit execution was unavailable in the current environment. Please use the new GitHub Actions jobs as the authoritative check/build/test/run verification before merging. The change is left as an open PR for review rather than merged automatically.

No Gitlink integration is added, in accordance with the October scope.

Follow-up: tag-triggered publishing

Added .github/workflows/publish.yml, following the mcp.mbt tagged publish workflow. A pushed vMAJOR.MINOR.PATCH tag triggers release; the job validates the tag against moon.mod, runs native check/build/info-diff/test, publishes with repository secret MOONCAKES_TOKEN (cleaned up on exit), and creates a GitHub Release only after successful publishing. No workflow_dispatch or branch publish trigger. Fixed three invalid match-arm commas in the quickstart identified from the first Actions run (which passed 55/55 native library tests and JS checks/builds). Re-validation is pending new PR CI.

Required repository configuration: supply the MOONCAKES_TOKEN secret before pushing the release tag. The workflow does not create or publish a tag itself.

Why: The PR workflow only checked compilation and the repository lacked a standalone example and installation steps.
What: Run native/JS checks and builds, native tests, and quickstart validation; add a local-workspace example and focused README setup instructions.
Result: CI now exercises a public-API counter from source checkout, with no production API changes.
Why: Fuwaroid needs a controlled tag-driven package release path, and the quickstart's first CI run exposed three invalid match-arm commas.
What: Add a version-matched vMAJOR.MINOR.PATCH publish workflow with native checks, tests, guarded credentials and GitHub releases; fix quickstart syntax.
Result: Release publishing runs only for pushed version tags after verification; ordinary branch pushes and PRs never publish.
Why: Target-specific build and test matrices are unnecessary for this project's standard validation and release.
What: Simplify PR and tag-release workflows to moon check --output-json and moon test --output-json, while retaining quickstart verification and guarded tag publishing.
Result: Both workflows use the normal MoonBit target selection with no explicit --target flags.
@colmugx
colmugx merged commit 58d06ec into main Oct 15, 2026
1 check passed
@colmugx
colmugx deleted the chore/ci-quickstart-readme branch October 15, 2026 06:54
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.

1 participant