-
Notifications
You must be signed in to change notification settings - Fork 711
Update CI workflows for Taiko/Surge integration tests #10419
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
352a998
Add CI workflow for Surge integration tests and update workflow for T…
jmadibekov b7eb06f
Update CI workflow to reference the correct surge configuration file
jmadibekov ed21b43
Update CI workflows to increase timeout for integration tests and adj…
jmadibekov f9e3b0c
Resolve comments
jmadibekov 12598e7
Merge branch 'master' into jmadibekov/update-taiko-surge-ci
jmadibekov 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,172 @@ | ||
| name: "Surge Integration Tests" | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| paths: | ||
| - "src/Nethermind/Nethermind.Taiko/**" | ||
| - ".github/workflows/ci-surge.yml" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| integration_tests: | ||
| if: >- | ||
| ${{ github.event.pull_request.draft == false | ||
| && !startsWith(github.head_ref, 'release-please') }} | ||
| name: Integration tests | ||
| runs-on: [ubuntu-latest] | ||
| timeout-minutes: 45 | ||
| env: | ||
| SURGE_TAIKO_MONO_DIR: surge-taiko-mono | ||
| PACAYA_FORK_TAIKO_MONO_DIR: pacaya-fork-taiko-mono | ||
| SHASTA_FORK_TAIKO_MONO_DIR: shasta-fork-taiko-mono | ||
|
|
||
| strategy: | ||
| matrix: | ||
| execution_node: [l2_nmc] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| repository: NethermindEth/surge-taiko-mono | ||
| path: ${{ env.SURGE_TAIKO_MONO_DIR }} | ||
| ref: surge-shasta | ||
|
|
||
| - name: Install Foundry | ||
| uses: foundry-rs/foundry-toolchain@v1 | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: ${{ env.SURGE_TAIKO_MONO_DIR }}/go.mod | ||
| cache: true | ||
|
|
||
| - name: Set up Git to use HTTPS | ||
|
jmadibekov marked this conversation as resolved.
Outdated
|
||
| shell: bash | ||
| run: | | ||
| git config --global url."https://github.com/".insteadOf "git@github.com:" | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
| run_install: false | ||
|
|
||
| - name: Install Node.js | ||
| uses: actions/setup-node@v5 | ||
| with: | ||
| node-version: 20 | ||
| cache: pnpm | ||
| cache-dependency-path: ${{ env.SURGE_TAIKO_MONO_DIR }}/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ${{ env.SURGE_TAIKO_MONO_DIR }} | ||
| shell: bash | ||
| run: pnpm install | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| repository: NethermindEth/surge-taiko-mono | ||
| path: >- | ||
| ${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, | ||
| env.PACAYA_FORK_TAIKO_MONO_DIR) }} | ||
| ref: jmadibekov/pacaya-dummy-verifiers-fix | ||
|
|
||
| - uses: actions/checkout@v6 | ||
| with: | ||
| repository: NethermindEth/surge-taiko-mono | ||
| path: >- | ||
| ${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, | ||
| env.SHASTA_FORK_TAIKO_MONO_DIR) }} | ||
| ref: surge-alethia-protocol-v3.0.0 | ||
|
|
||
| - name: Install pnpm dependencies for pacaya fork taiko-mono | ||
| working-directory: >- | ||
| ${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, | ||
| env.PACAYA_FORK_TAIKO_MONO_DIR) }} | ||
| run: cd ./packages/protocol && pnpm install | ||
|
|
||
| - name: Install pnpm dependencies for shasta fork taiko-mono | ||
| working-directory: >- | ||
| ${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, | ||
| env.SHASTA_FORK_TAIKO_MONO_DIR) }} | ||
| run: cd ./packages/protocol && pnpm install | ||
|
|
||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v3 | ||
|
|
||
| - name: Docker Build Nethermind Client | ||
| run: | | ||
| image_name="nethermindeth/nethermind" | ||
| image_tag="${GITHUB_SHA:0:8}" | ||
| full_image="${image_name}:${image_tag}" | ||
|
|
||
| echo "Building Docker image: ${full_image}" | ||
|
|
||
| docker buildx build . \ | ||
| --platform linux/amd64 \ | ||
| -f Dockerfile \ | ||
| -t "${full_image}" \ | ||
| --load \ | ||
| --build-arg BUILD_CONFIG=release \ | ||
| --build-arg CI=true \ | ||
| --build-arg COMMIT_HASH=${{ github.sha }} \ | ||
| --build-arg SOURCE_DATE_EPOCH=$(git log -1 --format=%ct) | ||
|
|
||
| echo "IMAGE_TAG=${full_image}" >> $GITHUB_ENV | ||
|
|
||
| echo "Verifying image exists locally:" | ||
| docker images | grep "${image_name}" | grep "${image_tag}" || (echo "Error: Image not found locally" && exit 1) | ||
|
|
||
| - name: Install yq | ||
| run: | | ||
| sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 | ||
| sudo chmod +x /usr/local/bin/yq | ||
| yq --version | ||
|
|
||
| - name: Update taiko-client docker-compose.yml with new image | ||
| working-directory: >- | ||
| ${{ env.SURGE_TAIKO_MONO_DIR }}/packages/taiko-client/internal/docker/nodes | ||
| run: | | ||
| docker_compose_file="docker-compose.yml" | ||
| if [ -f "$docker_compose_file" ]; then | ||
| echo "Current image in docker-compose.yml:" | ||
| yq eval '.services.l2_nmc.image' "$docker_compose_file" | ||
|
|
||
| echo "Updating docker-compose.yml with image: ${IMAGE_TAG}" | ||
| yq eval '.services.l2_nmc.image = "'"${IMAGE_TAG}"'"' -i "$docker_compose_file" | ||
|
|
||
| yq eval '.services.l2_nmc.pull_policy = "never"' -i "$docker_compose_file" | ||
|
|
||
| echo "Updated image in docker-compose.yml:" | ||
| yq eval '.services.l2_nmc.image' "$docker_compose_file" | ||
|
|
||
| echo "Pull policy set to:" | ||
| yq eval '.services.l2_nmc.pull_policy' "$docker_compose_file" | ||
| else | ||
| echo "Warning: docker-compose.yml not found at expected path" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Run Tests on ${{ matrix.execution_node }} execution engine | ||
| working-directory: >- | ||
| ${{ env.SURGE_TAIKO_MONO_DIR }}/packages/taiko-client | ||
| env: | ||
| L2_NODE: ${{ matrix.execution_node }} | ||
| run: >- | ||
| SHASTA_FORK_TAIKO_MONO=${GITHUB_WORKSPACE}/${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, env.SHASTA_FORK_TAIKO_MONO_DIR) }} | ||
| PACAYA_FORK_TAIKO_MONO=${GITHUB_WORKSPACE}/${{ format('{0}/{1}', env.SURGE_TAIKO_MONO_DIR, env.PACAYA_FORK_TAIKO_MONO_DIR) }} | ||
| make test | ||
|
|
||
| - name: Codecov.io | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| files: ${{ env.SURGE_TAIKO_MONO_DIR }}/packages/taiko-client/coverage.out | ||
| flags: taiko-client | ||
| env: | ||
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.