hive #2133
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
# Runs `ethereum/hive` tests. | |
name: hive | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */6 * * *" | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
prepare-reth: | |
uses: ./.github/workflows/prepare-reth.yml | |
with: | |
image_tag: ghcr.io/paradigmxyz/reth:latest | |
binary_name: reth | |
prepare-hive: | |
if: github.repository == 'paradigmxyz/reth' | |
timeout-minutes: 45 | |
runs-on: | |
group: Reth | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Checkout hive tests | |
uses: actions/checkout@v5 | |
with: | |
repository: ethereum/hive | |
path: hivetests | |
- uses: actions/setup-go@v6 | |
with: | |
go-version: "^1.13.1" | |
- run: go version | |
- name: Build hive assets | |
run: .github/assets/hive/build_simulators.sh | |
- name: Upload hive assets | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hive_assets | |
path: ./hive_assets | |
test: | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
# TEMPORARILY FOCUSED ON RE-ORG TESTS FOR DEBUGGING | |
scenario: | |
- sim: ethereum/engine | |
limit: engine-withdrawals | |
- sim: ethereum/engine | |
limit: engine-api | |
- sim: ethereum/engine | |
limit: cancun | |
needs: | |
- prepare-reth | |
- prepare-hive | |
name: run ${{ matrix.scenario.sim }}${{ matrix.scenario.limit && format(' - {0}', matrix.scenario.limit) }} | |
runs-on: | |
group: Reth | |
permissions: | |
issues: write | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- name: Download hive assets | |
uses: actions/download-artifact@v5 | |
with: | |
name: hive_assets | |
path: /tmp | |
- name: Download reth image | |
uses: actions/download-artifact@v5 | |
with: | |
name: artifacts | |
path: /tmp | |
- name: Load Docker images | |
run: .github/assets/hive/load_images.sh | |
- name: Move hive binary | |
run: | | |
mv /tmp/hive /usr/local/bin | |
chmod +x /usr/local/bin/hive | |
- name: Checkout hive tests | |
uses: actions/checkout@v5 | |
with: | |
repository: ethereum/hive | |
ref: master | |
path: hivetests | |
- name: Run simulator | |
run: | | |
LIMIT="${{ matrix.scenario.limit }}" | |
TESTS="${{ join(matrix.scenario.include, '|') }}" | |
if [ -n "$LIMIT" ] && [ -n "$TESTS" ]; then | |
FILTER="$LIMIT/$TESTS" | |
elif [ -n "$LIMIT" ]; then | |
FILTER="$LIMIT" | |
elif [ -n "$TESTS" ]; then | |
FILTER="/$TESTS" | |
else | |
FILTER="/" | |
fi | |
echo "filter: $FILTER" | |
.github/assets/hive/run_simulator.sh "${{ matrix.scenario.sim }}" "$FILTER" | |
- name: Parse hive output | |
run: | | |
find hivetests/workspace/logs -type f -name "*.json" ! -name "hive.json" | xargs -I {} python .github/assets/hive/parse.py {} --exclusion .github/assets/hive/expected_failures.yaml --ignored .github/assets/hive/ignored_tests.yaml | |
- name: Print simulator output | |
if: ${{ failure() }} | |
run: | | |
cat hivetests/workspace/logs/*simulator*.log | |
- name: Print reth client logs | |
if: ${{ failure() }} | |
run: | | |
cat hivetests/workspace/logs/reth/client-*.log | |
notify-on-error: | |
needs: test | |
if: false #failure() | |
runs-on: | |
group: Reth | |
steps: | |
- name: Slack Webhook Action | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: "Failed run: https://github.com/paradigmxyz/reth/actions/runs/${{ github.run_id }}" | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} |