Skip to content

feat(tests): CI Workflow to run basic checks against the templates#32

Merged
marc0olo merged 5 commits into
mainfrom
rk/testing-pipeline
Jun 12, 2026
Merged

feat(tests): CI Workflow to run basic checks against the templates#32
marc0olo merged 5 commits into
mainfrom
rk/testing-pipeline

Conversation

@raymondk

@raymondk raymondk commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Can be simplified a little if we add yq to the base dev image.

raymondk and others added 5 commits June 11, 2026 16:12
Adds the first milestone of the template testing pipeline: a thin test
image over ghcr.io/dfinity/icp-dev-env-all and a bash harness that
renders a template from the local checkout via `icp new`, builds,
deploys to a local network, and verifies a backend call — all inside
the container, against the icp CLI pinned in the image.

Covers a single hardcoded permutation (rust template, defaults);
the full matrix follows in M2.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces the hardcoded M1 permutation with a declarative matrix
(tests/matrix.txt) covering rust, motoko, and all four hello-world
backend/frontend combinations. The driver gains filtering by
permutation-id prefix, a --fail-fast flag, and a summary table.

Each permutation now verifies every canister in the rendered project:
asset canisters get an HTTP 200 check through the name-based gateway
domain (curl --resolve <name>.local.localhost:8000), everything else
gets the greet call. hello-world renders additionally assert the
variant directory renames.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a GitHub Actions workflow that runs the full template test suite
as a single sequential job on pull requests and pushes to main. The
suite stays sequential in one container: dependency caches warm up on
the first permutation, making the full matrix faster than parallel
cold containers would be. If the matrix grows, CI can split into a
job matrix via the harness's permutation filter without changes.

Local `make test` runs now mount named volumes for the cargo, npm and
mops caches so repeated runs skip re-downloading dependencies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The only thing the custom image added was yq, which the base image
will eventually ship. The harness now installs yq at startup if it's
missing (a no-op once the image includes it) and exports the env vars
the image doesn't set (USER for cargo-generate, DO_NOT_TRACK).

The icp CLI pin moves to the Makefile's IMAGE variable; an alternate
CLI can be tested with `make test IMAGE=...`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replaces recipe-type discovery with explicit per-template test
configuration. matrix.txt becomes matrix.yaml, where each template
declares its permutations and, per canister, what to verify after
deploy: a gateway curl (curl: true) and/or a canister call with
method, args, and an expected reply substring.

A configured canister name of {{project-name}} is substituted with
the rendered project's name, for templates whose icp.yaml names the
canister after the project.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@raymondk raymondk requested a review from a team as a code owner June 11, 2026 23:54
@marc0olo marc0olo merged commit 9f1e819 into main Jun 12, 2026
6 checks passed
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.

2 participants