Skip to content

Blockchain JSON-RPC Tests (Kurtosis) #214

Blockchain JSON-RPC Tests (Kurtosis)

Blockchain JSON-RPC Tests (Kurtosis) #214

Workflow file for this run

name: Blockchain JSON-RPC Tests (Kurtosis)
on:
schedule:
- cron: '0 0 * * *' # Run every day at 00:00 UTC
workflow_dispatch:
inputs:
client_tag:
description: "Client tag to run tests on"
required: true
default: "master"
pytest_tag:
description: "Tag to run pytest with"
required: true
default: "api"
consensus_port:
description: "Consensus port"
required: true
default: "4000"
branch:
description: "Branch of ethereum-package to use"
required: false
default: "main"
# push:
pull_request:
jobs:
setup-and-test:
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 15
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl jq
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -aG docker $USER
- name: Install Docker Compose
run: |
sudo curl -SL https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-linux-x86_64 --output docker-compose
sudo chmod +x docker-compose
sudo mv docker-compose /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
which docker-compose
docker-compose --version
- name: Clone ethereum-package repository
run: |
git clone -b ${{ github.event.inputs.branch || 'main' }} https://github.com/dmitriy-b/ethereum-package.git
echo "Using branch: ${{ github.event.inputs.branch || 'main' }}"
ls -la ethereum-package
ls -la /home/runner/work/blockchain-client-testing/blockchain-client-testing/
- name: Setup 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 kurtosis-cli
kurtosis analytics disable
echo "$(dirname $(which kurtosis))" >> $GITHUB_PATH
shell: bash
- name: Run the Kurtosis package
run: |
TRIMMED_PATH="${PATH//\/usr\/bin:/}"
BRANCH_NAME="${{ github.head_ref || github.ref_name }}"
ENCLAVE_NAME="${BRANCH_NAME//\//-}"
kurtosis enclave rm ${ENCLAVE_NAME} -f 2>/dev/null || echo "Couldn't delete perhaps first run"
docker pull nethermindeth/nethermind:master
kurtosis run ethereum-package --args-file .github/kurtosis/minimal.yaml --enclave ${ENCLAVE_NAME} | tee kurtosis_output.txt
shell: bash
- name: Install Python dependencies
run: |
ls -la
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run verification scenario 1
env:
KURTOSIS_SLACK_WEBHOOK_LINK: ${{ secrets.SLACK_WEBHOOK_URL }}
KURTOSIS_CI_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
KURTOSIS_SLACK_NOTIFY_ONLY_FAILED: 0
run: |
pytest -m ${{ github.event.inputs.pytest_tag || 'api' }} --env=kurtosis --html=reports/integration_tests.html
- name: Run performance scenario 1
env:
KURTOSIS_SLACK_WEBHOOK_LINK: ${{ secrets.SLACK_WEBHOOK_URL }}
KURTOSIS_CI_JOB_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
KURTOSIS_SLACK_NOTIFY_ONLY_FAILED: 1
run: |
LOG_STDOUT_LEVEL=ERROR pytest --env=kurtosis -k "test_performance_1"
# - name: Save consensus logs
# if: always()
# run: |
# docker logs sedge-consensus-client 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" > consensus.log
# - name: Save execution logs
# if: always()
# run: |
# docker logs sedge-execution-client 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" > execution.log
# - name: Upload Sedge logs
# if: failure()
# uses: actions/upload-artifact@v4
# with:
# name: sedge-logs
# path: sedge.logs
# - name: Upload Locust pytest and locust reports
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: test-reports
# path: reports/
# - name: Upload consensus logs
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: consensus-logs
# path: consensus.log
# - name: Upload execution logs
# if: always()
# uses: actions/upload-artifact@v4
# with:
# name: execution-logs
# path: execution.log