datahaven/.github/workflows/task-e2e.yml
Steve Degosserie 62393dee23
ci: migrate from self-hosted to standard GitHub runners (#482)
## Summary
- Self-hosted `DH-runners` have been decommissioned — all Rust build,
test, and lint workflows now use `ubuntu-latest`
- Removed `install-deps: false` overrides so workflows use the default
apt-based dependency installation path
- Updated `setup-env` action descriptions to remove self-hosted runner
references

### Workflows updated
- `task-build-operator.yml`
- `task-build-static-operator.yaml`
- `task-publish-binary.yml`
- `task-rust-lint.yml` (3 jobs)
- `task-rust-tests.yml`
- `task-warm-sccache.yml`
- `task-e2e.yml`

## Test plan
- [x] Verify all Rust CI jobs pass on `ubuntu-latest` (build, lint,
test, warm-cache)
- [x] Confirm sccache and dependency installation work correctly on
standard runners
- [x] Ensure E2E workflow runs with Docker (instead of Podman) on
standard runners

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 23:11:39 +02:00

158 lines
5.2 KiB
YAML

# End-To-End Tests: CI for starting a full ETH private network, deploying AVS and running tests.
#
# Overview:
# 1. Start kurtosis network
# 2. Deploy AVS contracts
# 3. Start DataHaven node
# 4. Run E2E tests
name: E2E - Kurtosis Deploy and Verify
on:
workflow_dispatch:
inputs:
image-tag:
description: "The tag of the docker image"
required: true
type: string
workflow_call:
inputs:
image-tag:
description: "The tag of the docker image"
required: true
type: string
secrets:
DOCKERHUB_USERNAME:
required: false
DOCKERHUB_TOKEN:
required: false
permissions:
contents: read
packages: read
env:
FOUNDRY_PROFILE: ci
LOG_LEVEL: debug
# DOCKER_HOST: unix:///run/user/1020/podman/podman.sock # was: self-hosted podman socket
KURTOSIS_CORE_IMAGE: docker.io/kurtosistech/core
KURTOSIS_ENGINE_IMAGE: docker.io/kurtosistech/engine
KURTOSIS_VERSION: 1.15.2
INJECT_CONTRACTS: false
jobs:
kurtosis:
runs-on: ubuntu-latest
# was: runs-on:
# group: DH-Testing
name: E2E Tests with Kurtosis Ethereum Network
defaults:
run:
working-directory: test
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: test/.bun-version
- name: Check for outdated state-diff.json
run: bun ./scripts/check-generated-state.ts
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.4.3
- name: Pull Kurtosis images
run: |
docker pull ${{ env.KURTOSIS_CORE_IMAGE }}:${{ env.KURTOSIS_VERSION }}
docker pull ${{ env.KURTOSIS_ENGINE_IMAGE }}:${{ env.KURTOSIS_VERSION }}
- name: Install Kurtosis
run: |
# Install Kurtosis locally without sudo
# SHA256 checksum for release kurtosis binary (v1.15.2)
KURTOSIS_SHA256="5da4731180f60021bbb1d313e1d2994b7d0fcdeae1a2f2081c620cf51a265463"
if ! command -v kurtosis &> /dev/null; then
echo "Installing Kurtosis $KURTOSIS_VERSION locally"
mkdir -p ~/.local/bin
wget -q -O kurtosis-cli.tar.gz "https://github.com/kurtosis-tech/kurtosis-cli-release-artifacts/releases/download/${KURTOSIS_VERSION}/kurtosis-cli_${KURTOSIS_VERSION}_linux_amd64.tar.gz"
tar -xzf kurtosis-cli.tar.gz -C ~/.local/bin
rm kurtosis-cli.tar.gz
# Verify checksum before making executable
echo "Verifying kurtosis checksum..."
echo "${KURTOSIS_SHA256} $HOME/.local/bin/kurtosis" | sha256sum -c -
chmod +x ~/.local/bin/kurtosis
echo "$HOME/.local/bin" >> $GITHUB_PATH
export PATH="$HOME/.local/bin:$PATH"
else
echo "Kurtosis is already installed: $(kurtosis version)"
fi
kurtosis analytics disable
kurtosis version
# was: podman cluster config for self-hosted runner
# - name: Configure Kurtosis cluster = podman
# run: |
# CFG_PATH="$(kurtosis config path)"
# mkdir -p "$(dirname "$CFG_PATH")"
# cat > "$CFG_PATH" <<'YML'
# config-version: 6
# should-send-metrics: true
# kurtosis-clusters:
# docker:
# type: "docker"
# podman:
# type: "podman"
# YML
# kurtosis cluster set podman
# kurtosis cluster get
- name: Start Kurtosis engine
run: |
kurtosis engine stop || true
kurtosis clean || true
kurtosis engine start
kurtosis engine status
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
if: github.repository == 'datahaven-xyz/datahaven'
uses: docker/login-action@v3
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Download Snowbridge relay binary
run: |
docker create --name temp datahavenxyz/snowbridge-relay:latest
mkdir -p tmp/bin
docker cp temp:/usr/local/bin/snowbridge-relay tmp/bin/
chmod +x tmp/bin/snowbridge-relay
docker rm -fv temp
tmp/bin/snowbridge-relay --help
- name: Pull DataHaven node image
run: |
docker pull ghcr.io/datahaven-xyz/datahaven/datahaven:${{ inputs.image-tag }}
docker tag ghcr.io/datahaven-xyz/datahaven/datahaven:${{ inputs.image-tag }} datahavenxyz/datahaven:local
- run: bun install
- name: Run E2E tests
run: bun test:e2e
- name: Delete volumes not used
if: always()
run: docker system prune --volumes -f
# was: podman system prune --volumes -f