Overview
Dokrypt integrates with CI/CD pipelines so your smart contract tests run automatically on every push and pull request. Thedokrypt ci generate command scaffolds workflow files for your CI provider.
Quick Start
GitHub Actions
Generate Workflow
.github/workflows/dokrypt.yml:
What It Does
- Triggers on push to
main/developand on pull requests - Installs Dokrypt via npm
- Runs
dokrypt doctorto verify Docker is available - Starts the full environment (
dokrypt up) - Runs all tests with JSON output for machine parsing
- Uploads test results as a build artifact
- Cleans up the environment even if tests fail
With Deployment
deploy-testnet job that runs after tests pass on the main branch. Requires these GitHub secrets:
GitLab CI
Generate Config
.gitlab-ci.yml:
GitLab CI requires Docker-in-Docker (
docker:dind) as a service since Dokrypt uses Docker to run blockchain nodes.JSON Test Output
All CI workflows use--json output. The format:
- Fail builds on test failures (exit code is non-zero)
- Track gas usage over time by comparing
gas_reportacross commits - Generate reports in your CI dashboard