Tutorials
Build, test and cache a small project in your language, the same way on your laptop and in CI.
Each tutorial takes a small greet project from an empty build file to a cached
pipeline that CI runs with one command. The steps are the same in every language:
- Pick an image that pins the toolchain, so nothing needs to be installed on the host.
- Declare what each task reads (
src) and produces (generates). - Order the tasks with
deps. - Group everything CI checks in one
citask. - Run it twice: the second run executes nothing.
Node.js
TypeScript with npm, tsc and node --test.
Python
A virtualenv, pytest and ruff.
Go
Modules, go vet, go test and a binary.
Rust
Cargo, tests and a release binary.
Java
Maven, JUnit and a jar.
.NET
NuGet, xUnit and a published app.
Dependencies first
Every tutorial except Go starts with a task that only downloads dependencies. It reads nothing but the manifest and the lockfile, so it runs again only when a dependency changes, and the tasks after it build against what it downloaded:
| Language | Image | Download task | Keeps |
|---|---|---|---|
| Node.js | node:24-alpine | npm ci | node_modules |
| Python | python:3.13-slim | pip install -r requirements.txt | .venv |
| Rust | rust:1.90-slim | cargo fetch | .cargo-home |
| Java | maven:3.9-eclipse-temurin-21 | mvn dependency:go-offline | .m2 |
| .NET | mcr.microsoft.com/dotnet/sdk:10.0 | dotnet restore | .nuget |
A task's outputs have to be inside the project, so where a package manager downloads into the home directory by default, the tutorial points it at a folder in the project. Go is the exception: its module cache can only be set to an absolute path, which differs between your laptop and CI. There the module cache is mounted instead, and every task downloads what's missing from it.
Tested like the code
Every tutorial's project is in the repository's
examples/ folder
(tutorial-node, tutorial-python, …) and hammerkit's integration tests run it:
ci builds from scratch, then a second run has to come entirely from the cache.
The build files in the tutorials are those files.