-
Notifications
You must be signed in to change notification settings - Fork 25
ci: Local Net CI Workflow #562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lmnzx
wants to merge
9
commits into
sigp:unstable
Choose a base branch
from
lmnzx:local-net-ci-workflow
base: unstable
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+117
−11
Open
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
6e4ed4c
local testnet ci workflow
lmnzx 0031fe2
more logging
lmnzx b3dcec8
updated the runners and using dknopik/ssv-mini for the localnet tests
lmnzx 85b241f
new line at EOF
lmnzx c75339b
using a specfic commit hash
lmnzx a01245b
downloading kurtosis from github
lmnzx 704ea0e
fixing the url to the cli artifact
lmnzx ffd004b
BREAK PROPOSALS :burn:
dknopik 25766fb
fix clippy
dknopik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| # could be a potential issue as apt.fury.io is not stable, switch to using binary if happens | ||
lmnzx marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - 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 | ||
lmnzx marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @dknopik
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dknopik ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dknopik