Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
25bf10b
feat: M3 - GitHub Action, Cluster, and E2E Golden Flow
intelliDean Mar 8, 2026
d4a5110
feat: implement reusable action and artifact parity
intelliDean Mar 8, 2026
1b667de
feat: implement reusable action and artifact parity
intelliDean Mar 8, 2026
0c07b62
fix: action pathing and CLI warnings
intelliDean Mar 8, 2026
5ff7144
fix: explicit project-dir for reliable Action pathing
intelliDean Mar 8, 2026
c361ee1
fix the action.yml
intelliDean Mar 9, 2026
f913d91
perf: optimize CI runtime by switching to debug builds and enabling c…
intelliDean Mar 9, 2026
15d293f
fix: zaino healthcheck and finalize performance optimizations
intelliDean Mar 9, 2026
a1f6641
fix: use absolute path for ZecKit binary in Action
intelliDean Mar 9, 2026
d12cae8
feat: implement container registry caching for CI performance
intelliDean Mar 9, 2026
52a6de7
fix: use docker/setup-buildx-action instead of actions
intelliDean Mar 9, 2026
a08aa51
fix: lowercase repository name in Docker tags for GHCR
intelliDean Mar 9, 2026
2eb66ba
fix: remove silent pull fallback for better CI diagnostics
intelliDean Mar 9, 2026
e32fd5a
fix: correct block generation sequence to prevent infinite wait loop
intelliDean Mar 10, 2026
e56cfbf
fix: add --profile flag to docker compose pull to actually fetch back…
intelliDean Mar 10, 2026
d17a4c1
fix: change runner from self-hosted to ubuntu-latest in smoke test
intelliDean Mar 10, 2026
9bd30a9
fix: pull ghcr images to avoid 10-minute timeout limit from source build
intelliDean Mar 10, 2026
0e5837c
fix: lowercase repository name for GHCR prefix
intelliDean Mar 10, 2026
9eb7316
fix: update smoke test script path to docker/healthchecks/check-zebra.sh
intelliDean Mar 10, 2026
4303779
fix: make background miner persist during tests and fix artifact name…
intelliDean Mar 10, 2026
80dba46
docs: add self-hosted runner instructions and revert smoke-test.yml r…
intelliDean Mar 11, 2026
1509631
fix: e2e-test.yml docker pull GHCR caching and exec container resolution
intelliDean Mar 11, 2026
4d3bcbb
fix: remove obsolete regtest feature flag from zingo build
intelliDean Mar 11, 2026
8fc8904
fix: add missing docker log collection to action.yml on failure
intelliDean Mar 12, 2026
a8269e2
fix(cli): make test_shielded_send return error on insufficient balanc…
intelliDean Mar 12, 2026
9b35331
fix(cli): make test_wallet_shield throw error instead of skipping on …
intelliDean Mar 12, 2026
d49d2ed
fix(action): safely catch test exit code to ensure outputs are popula…
intelliDean Mar 12, 2026
53c0069
docs: add Failure Drills guide and example-app
intelliDean Mar 12, 2026
d408d75
chore: relocate example-app to sample repo and update docs
intelliDean Mar 12, 2026
9bf9ea2
feat(cli): add 'zeckit init' command to auto-generate CI workflows an…
intelliDean Mar 12, 2026
c99ea09
docs: finalize README and walkthrough for Milestone 3 completion
intelliDean Mar 12, 2026
ff52fdf
fix(cli,faucet): stabilize devnet sync, add timeouts and retries
intelliDean Mar 13, 2026
9a5366c
Fix CI actions pathing
intelliDean Mar 13, 2026
7498d40
Fix artifact collision by including job ID
intelliDean Mar 13, 2026
abf76d5
docs: Add detailed explanation for the 'zeckit init' command
intelliDean Mar 13, 2026
6871f6f
docs: add local devnet startup guide and update readme
intelliDean Mar 13, 2026
4af7a1d
fix(cli): decoupling init output path from project_dir
intelliDean Mar 13, 2026
7fff092
Fix: made down command profile-aware and fixed unused variable warning
intelliDean Mar 13, 2026
2c8a03d
Update init template to use intelliDean fork
intelliDean Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Build and Push Docker Images

on:
push:
branches:
- main
- m3-implementation
workflow_dispatch:

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- service: zebra-miner
context: ./docker/zebra
- service: zebra-sync
context: ./docker/zebra
- service: lightwalletd
context: ./docker/lightwalletd
- service: zaino
context: ./docker/zaino
- service: zingo
context: ./docker/zingo
- service: zeckit-faucet
context: ./zeckit-faucet

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lowercase repo
id: repo
shell: bash
run: echo "name=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT

- name: Build and push
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
push: true
tags: ghcr.io/${{ steps.repo.outputs.name }}/${{ matrix.service }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
55 changes: 20 additions & 35 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,16 @@ on:
jobs:
e2e-tests:
name: ZecKit E2E Test Suite
runs-on: self-hosted
runs-on: ubuntu-latest

timeout-minutes: 60
timeout-minutes: 120

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Start Docker Desktop
run: |
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " Starting Docker Desktop"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

if ! docker ps > /dev/null 2>&1; then
open /Applications/Docker.app

echo "Waiting for Docker daemon..."
for i in {1..60}; do
if docker ps > /dev/null 2>&1; then
echo "✓ Docker daemon is ready!"
break
fi
echo "Attempt $i/60: Docker not ready yet, waiting..."
sleep 2
done
else
echo "✓ Docker already running"
fi

docker --version
docker compose version
echo ""
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Check environment
run: |
Expand All @@ -69,17 +46,18 @@ jobs:
echo "Stopping containers..."
docker compose down 2>/dev/null || true

# Remove volumes to clear stale data (keeps images!)
# Remove volumes to clear stale data
echo "Removing stale volumes..."
docker volume rm zeckit_zebra-data 2>/dev/null || true
docker volume rm zeckit_zebra-sync-data 2>/dev/null || true
docker volume rm zeckit_zaino-data 2>/dev/null || true
docker volume rm zeckit_zingo-data 2>/dev/null || true
docker volume rm zeckit_faucet-wallet-data 2>/dev/null || true
docker volume rm zeckit_lightwalletd-data 2>/dev/null || true
docker volume rm zeckit_faucet-data 2>/dev/null || true

# Remove orphaned containers
docker compose down --remove-orphans 2>/dev/null || true

echo "✓ Cleanup complete (images preserved)"
echo "✓ Cleanup complete"
echo ""

- name: Build CLI binary
Expand All @@ -101,6 +79,13 @@ jobs:
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

# Set IMAGE_PREFIX to pull pre-built images from GHCR
REPO_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
export IMAGE_PREFIX="ghcr.io/$REPO_LOWER"

echo "Pulling pre-built images from $IMAGE_PREFIX..."
docker compose pull --profile zaino || true

# No --fresh flag, but volumes are already cleared above
./cli/target/release/zeckit up --backend zaino &
PID=$!
Expand Down Expand Up @@ -166,7 +151,7 @@ jobs:
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""

docker exec zeckit-zingo-wallet bash -c "echo -e 'balance\nquit' | zingo-cli --data-dir /var/zingo --server http://zaino:9067 --chain regtest --nosync" 2>/dev/null || echo "Could not retrieve balance"
docker compose exec -T faucet-zaino bash -c "echo -e 'balance\nquit' | zingo-cli --data-dir /var/zingo --server http://zaino:9067 --chain regtest --nosync" 2>/dev/null || echo "Could not retrieve balance"
echo ""

- name: Check faucet status
Expand All @@ -186,9 +171,9 @@ jobs:
echo "Collecting logs for artifact..."
mkdir -p logs

docker compose logs zebra > logs/zebra.log 2>&1 || true
docker compose logs zebra-miner > logs/zebra-miner.log 2>&1 || true
docker compose logs zebra-sync > logs/zebra-sync.log 2>&1 || true
docker compose logs zaino > logs/zaino.log 2>&1 || true
docker compose logs zingo-wallet-zaino > logs/zingo-wallet.log 2>&1 || true
docker compose logs faucet-zaino > logs/faucet.log 2>&1 || true
docker ps -a > logs/containers.log 2>&1 || true
docker network ls > logs/networks.log 2>&1 || true
Expand Down Expand Up @@ -230,7 +215,7 @@ jobs:
echo "✓ Status: ALL TESTS PASSED ✓"
echo ""
echo "Completed checks:"
echo " ✓ Docker Desktop started"
echo " ✓ Environment checked"
echo " ✓ CLI binary built"
echo " ✓ Devnet started (clean state, cached images)"
echo " ✓ Smoke tests passed"
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ on:
jobs:
smoke-test:
name: Zebra Smoke Test
runs-on: self-hosted # Runs on your WSL runner
runs-on: ubuntu-latest #runs-on: self-hosted

# Timeout after 10 minutes (devnet should be up much faster)
timeout-minutes: 10
# Timeout after 20 minutes
timeout-minutes: 20

steps:
- name: Checkout code
Expand All @@ -38,6 +38,13 @@ jobs:

- name: Start zeckit devnet
run: |
# Convert repo name to lowercase for GHCR as Docker requires lowercase image references
REPO="${{ github.repository }}"
export IMAGE_PREFIX="ghcr.io/${REPO,,}"

echo "Pulling pre-built Zebra images..."
docker compose pull zebra-miner zebra-sync || true

echo "Starting Zebra regtest node..."
docker compose up -d

Expand Down Expand Up @@ -71,8 +78,8 @@ jobs:
- name: Run smoke tests
run: |
echo "Running smoke test suite..."
chmod +x tests/smoke/basic-health.sh
./tests/smoke/basic-health.sh
chmod +x docker/healthchecks/check-zebra.sh
./docker/healthchecks/check-zebra.sh

- name: Collect Zebra logs
if: always()
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,10 @@ Thumbs.db
ehthumbs_vista.db
actions-runner/
*.bak



zeckit-sample

demo.md
pdf_content.txt
77 changes: 77 additions & 0 deletions FAILURE_DRILLS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ZecKit Failure Drills Guide

Failure Drills are designed to prove that your downstream CI handles edge cases (like out-of-funds or timeouts) gracefully. Instead of a standard "Happy Path" test, Failure Drills intentionally break the Devnet to verify that diagnostic artifacts are collected and the pipeline behaves predictably.

## Available Configuration Parameters

When using the `intelliDean/ZecKit` Action to configure a Failure Drill, you can override several parameters to trigger specific failure conditions.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `backend` | `string` | `"zaino"` | The indexing backend to use (`"zaino"`, `"lightwalletd"`, or `"none"`). |
| `startup_timeout_minutes` | `string` | `"10"` | How long to wait for the devnet to report healthy status. Set to `"1"` to trigger a timeout drill. |
| `send_amount` | `string` | `"0.5"` | The amount of ZEC to send in the E2E Golden Flow test. Set to `"999.0"` to trigger an insufficient funds overflow drill. |
| `block_wait_seconds` | `string` | `"75"` | Time to wait for blockchain propagation and syncing after mining starts. Lowering it can trigger sync timeouts. |
| `upload_artifacts` | `string` | `"on-failure"` | To ensure logs are always captured during drills, set this to `"always"`. |

## How to Add a New Failure Drill

You can add Failure Drills inside your own repository's `.github/workflows/failure-drill.yml` file.

Below is a complete template showcasing two common failure drills: "Startup Timeout" and "Send Amount Overflow".

### Example Failure Drill Workflow Template

```yaml
name: Failure Drill Verification

on: [workflow_dispatch, push]

jobs:
# Example Drill 1: Purposefully Time Out Devnet Startup
drill-timeout:
runs-on: ubuntu-latest
steps:
- name: ZecKit Action - Force Timeout
id: zeckit
uses: intelliDean/ZecKit@main
with:
backend: zaino
startup_timeout_minutes: '1' # Extremely short timeout
upload_artifacts: always
# The drill WILL fail, so we allow it to continue to assert the failure.
continue-on-error: true

- name: Assert Failure correctly captured
run: |
if [[ "${{ steps.zeckit.outputs.test_result }}" == "pass" ]]; then
echo "::error::Drill failed: Expected a timeout failure, but got a pass!"
exit 1
fi
echo "Drill successfully produced an expected timeout error."

# Example Drill 2: Overflow Send Amount
drill-insufficient-funds:
runs-on: ubuntu-latest
steps:
- name: ZecKit Action - Force Overflow
id: zeckit
uses: intelliDean/ZecKit@main
with:
backend: lightwalletd
send_amount: '9999.0' # Amount larger than the faucet holds
upload_artifacts: always
continue-on-error: true

- name: Assert Failure correctly captured
run: |
if [[ "${{ steps.zeckit.outputs.test_result }}" == "pass" ]]; then
echo "::error::Drill failed: Expected an insufficient funds failure, but got a pass!"
exit 1
fi
echo "Drill successfully caught the overflow exception."
```

## Validating Output Artifacts

Because the Action was provided `upload_artifacts: always`, it will upload a ZIP folder containing `.log` files (e.g., `zebra.log`, `lightwalletd.log`, `containers.log`) for every drill. You can download and parse these logs automatically via the GitHub CLI (`gh run download`) as a final verification step in your CI!
Loading