From 8ebc11aa78a5344a67543bcf52ca16270f31f8fc Mon Sep 17 00:00:00 2001 From: Dmytro Biloshytskyi Date: Fri, 13 Dec 2024 16:08:15 +0200 Subject: [PATCH] Added a feature to run CI tests against specific docker image --- .../workflows/dashboard_debug_detailed.yml | 129 ++++++++++++++++++ configs/generic.yml | 4 + 2 files changed, 133 insertions(+) create mode 100644 .github/workflows/dashboard_debug_detailed.yml create mode 100644 configs/generic.yml diff --git a/.github/workflows/dashboard_debug_detailed.yml b/.github/workflows/dashboard_debug_detailed.yml new file mode 100644 index 0000000000..9522c1d5a2 --- /dev/null +++ b/.github/workflows/dashboard_debug_detailed.yml @@ -0,0 +1,129 @@ +name: Debug Gnosis Tests (detailed) + +on: + workflow_dispatch: + inputs: + baseimage: + description: "Base image" + required: true + default: "nethermindeth/nethermind" + type: string + tag: + description: "Client docker image tag" + required: true + default: "master" + type: string + client: + description: "Client" + required: true + default: "nethermind-gnosis" + type: choice + options: + - nethermind-gnosis + - erigon-gnosis + - nethermind-old + - erigon-old + - reth-gnosis + suite: + description: "Suite to run. Could be any of the following: withdrawals cancun engine-api engine-auth engine-exchange-capabilities network. To run a single test, use the test name started from "/" (e.g. /Withdrawals Fork on Canonical Block 8 / Side Block 7 - 10 Block Re-Org Sync)" + required: true + default: "withdrawals" + type: string + branch: + description: "Branch to run tests on" + required: true + default: "reflow" + simulator: + description: "Hive simulator" + required: true + default: "ethereum/gnosis-engine-jq" + type: choice + options: + - ethereum/gnosis-engine-jq + - ethereum/engine-gnosis-erigon + - ethereum/engine-gnosis-nethermind + - smoke + parallelism: + description: "Parallelism" + required: true + default: "1" + type: number + min: 1 + max: 10 + hive_ttd_enabled: + description: "Hive TTD Enabled" + required: true + default: "true" + type: boolean + log_level: + description: "Log level" + default: "5" + type: number + min: 1 + max: 5 + sim_log_level: + description: "Simulator log level" + default: "5" + type: number + min: 1 + max: 5 + client_check_time_limit: + description: "Single test timeout" + default: "10m" + type: string + +jobs: + hive-run: + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: stable + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Install Linux packages + run: | + sudo apt-get update + sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential + + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.event.inputs.branch }} + + - name: Download dependencies + run: go get -v ./... + + - name: Patch Hive Dockerfile + run: | + tag=${{ github.event.inputs.tag }} + client=${{ github.event.inputs.client }} + baseimage=${{ github.event.inputs.baseimage }} + sed -i \ + -e "s|client: custom_client|client: $client|" \ + -e "s|baseimage: custom_image|baseimage: $baseimage|" \ + -e "s|tag: custom_tag|tag: $tag|" \ + hive/configs/generic.yml + cat hive/configs/generic.yml + + - name: Run tests + continue-on-error: true + run: | + HIVE_TTD_ENABLED=${{ github.event.inputs.hive_ttd_enabled }} ./hive --sim "${{ github.event.inputs.simulator }}" --sim.limit="${{ github.event.inputs.suite }}" --client-file configs/generic.yml --results-root=${{ github.workspace }}/runs --sim.loglevel=${{ github.event.inputs.sim_log_level }} --loglevel=${{ github.event.inputs.log_level }} --client.checktimelimit=${{ github.event.inputs.client_check_time_limit }} --docker.output --sim.parallelism=${{ github.event.inputs.parallelism }} + + - name: Send file over SSH + if: always() + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + source: ${{ github.workspace }}/runs/* + target: ${{ secrets.DIR }}/ diff --git a/configs/generic.yml b/configs/generic.yml new file mode 100644 index 0000000000..14521656b3 --- /dev/null +++ b/configs/generic.yml @@ -0,0 +1,4 @@ +- client: nethermind + build_args: + baseimage: nethermindeth/nethermind + tag: master