Skip to content

Commit

Permalink
ci(l1): add integration tests workflow with hive and assertoor. (#1315)
Browse files Browse the repository at this point in the history
**Motivation**
This is the only way to make it work, using `workflow_run` sucks.

**Description**
- Merged assertoor and hive tests into the same workflow so that they
can reuse the `docker_build` job
- Also fixed an issue with assertoor and kurtosis when having prism as
part of the network

---------

Co-authored-by: Rodrigo Oliveri <[email protected]>
  • Loading branch information
mpaulucci and rodrigo-o authored Nov 27, 2024
1 parent 838e530 commit 94d725e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 89 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/asertoor.yaml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/docker_build.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ jobs:
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
65 changes: 57 additions & 8 deletions .github/workflows/hive.yaml → .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Hive
name: Integration Test
on:
workflow_run:
workflows: [Docker build]
types: [completed]
push:
branches: ["main"]
merge_group:
pull_request:
branches: ["**"]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -12,10 +14,59 @@ env:
RUST_VERSION: 1.80.1

jobs:
docker_build:
name: Docker Build image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
load: true
tags: ethrex
outputs: type=docker,dest=/tmp/ethrex_image.tar

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ethrex_image
path: /tmp/ethrex_image.tar

run-assertoor:
name: Assertoor - Stability Check
runs-on: ubuntu-latest
needs: [docker_build]
steps:
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ethrex_image
path: /tmp

- name: Load image
run: |
docker load --input /tmp/ethrex_image.tar
- name: Setup kurtosis testnet and run assertoor tests
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
kurtosis_version: "1.4.2"
ethereum_package_url: "github.com/lambdaclass/ethereum-package"
ethereum_package_branch: "ethrex-integration"
ethereum_package_args: "./test_data/network_params.yaml"

run-hive:
name: ${{ matrix.name }}
name: Hive - ${{ matrix.name }}
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
needs: [docker_build]
strategy:
matrix:
include:
Expand Down Expand Up @@ -46,8 +97,6 @@ jobs:
with:
name: ethrex_image
path: /tmp
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Load image
run: |
Expand Down
2 changes: 1 addition & 1 deletion test_data/network_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ participants:
cl_type: lighthouse
validator_count: 32
- el_type: geth
cl_type: prysm
cl_type: lighthouse
validator_count: 32

additional_services:
Expand Down

0 comments on commit 94d725e

Please sign in to comment.