Skip to content
Open
Changes from 3 commits
Commits
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
100 changes: 100 additions & 0 deletions .github/workflows/local-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: local testnet

on:
push:
branches:
- stable
- 'pr/*'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:

jobs:
build-docker-image:
runs-on: warp-ubuntu-latest-x64-16x
steps:
- uses: actions/checkout@v5

- name: Build Docker Image
# has to be Dockerfile.devnet as spec-minimal is necessary
run: |
docker build -f Dockerfile.devnet -t node/anchor:latest .
docker save node/anchor:latest -o anchor-docker.tar

- name: Upload Docker Image Artifact
uses: actions/upload-artifact@v4
with:
name: anchor-docker
path: anchor-docker.tar
retention-days: 1

run-local-testnet:
runs-on: warp-ubuntu-latest-x64-16x
needs: build-docker-image
steps:
- uses: actions/checkout@v5
with:
repository: dknopik/ssv-mini
ref: fixes
Copy link

Copilot AI Sep 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using a personal repository ('dknopik/ssv-mini') and a non-specific branch reference ('fixes') in production CI creates dependency risks. Consider using a stable, official repository or fork it under the organization's namespace with a specific commit hash or tagged version.

Suggested change
repository: dknopik/ssv-mini
ref: fixes
repository: your-org/ssv-mini
ref: v1.2.3

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, at least we should use a specific commit hash here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using a personal branch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to use the specific commit hash

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we using a personal branch?

currently, we had to make slight adjustments in order to get the config working. this is currently done in a slightly hacky way to get this MVP for our CI.

We will continue to improve on this initial state and eventually upstream all changes to ssv-mini

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about we move it to sigp?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# could be a potential issue as apt.fury.io is not stable, switch to using binary if happens
- name: Install Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install -y kurtosis-cli
kurtosis analytics disable

- name: Download Docker Image Artifact
uses: actions/download-artifact@v5
with:
name: anchor-docker
path: .

- name: Load Docker Image
run: docker load -i anchor-docker.tar

- name: Start Local Testnet with Assertoor
timeout-minutes: 30
run: make run

- name: Await Assertoor Test Result
id: assertoor_test_result
uses: ethpandaops/assertoor-github-action@v1
with:
kurtosis_enclave_name: localnet

- name: Return Assertoor Test Result
shell: bash
run: |
test_result="${{ steps.assertoor_test_result.outputs.result }}"
test_status=$(
cat <<"EOF"
${{ steps.assertoor_test_result.outputs.test_overview }}
EOF
)
failed_test_status=$(
cat <<"EOF"
${{ steps.assertoor_test_result.outputs.failed_test_details }}
EOF
)

echo "Test Result: $test_result"
echo "$test_status"
if ! [ "$test_result" == "success" ]; then
echo "Failed Test Task Status:"
echo "$failed_test_status"
exit 1
fi

- name: Kurtosis Dump
if: always()
run: kurtosis enclave dump localnet anchor-localnet-test-logs

- name: Upload Logs Artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: anchor-localnet-test-logs
path: anchor-localnet-test-logs/
retention-days: 3
Loading