plugeth-statediff/.gitea/workflows/test.yml
Roy Crihfield b5642c612a
All checks were successful
Test / Run compliance tests (push) Successful in 4m17s
Test / Run unit tests (push) Successful in 13m20s
Test / Run integration tests (push) Successful in 29m18s
Index Withdrawal objects (#25)
Indexes the new validator withdrawal objects (from Shanghai/Capella fork: https://eips.ethereum.org/EIPS/eip-4895)
- new table `eth.withdrawal_cids`
- new column `withdrawals_root` in `eth.header_cids`
- add unit tests
- use new external stack repo in CI/CT job (cerc-io/fixturenet-eth-stacks#14)

Reviewed-on: #25
2024-06-28 09:44:58 +00:00

129 lines
4.0 KiB
YAML

name: Test
on:
pull_request:
branches: '*'
push:
branches:
- main
- ci-test
env:
SO_VERSION: roysc/fix-various
FIXTURENET_ETH_STACKS_VERSION: plugeth-stack
jobs:
unit-tests:
name: Run unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Run DB container
run: |
docker compose -f test/compose.yml up --wait
- name: Run tests
run: go test -p 1 -v ./...
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ./plugeth-statediff
progress: false
- name: Build docker image
run: |
docker build ./plugeth-statediff -t cerc/plugeth-statediff:local
- name: "Install Python for ARM on Linux"
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
uses: deadsnakes/action@v3.0.1
with:
python-version: 3.11
- name: "Install Python cases other than ARM on Linux"
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Print Python version"
run: python3 --version
- name: Install stack-orchestrator
# run: |
# curl -L -O https://github.com/cerc-io/stack-orchestrator/releases/download/$SO_VERSION/laconic-so
# chmod +x laconic-so
# echo PATH="$PATH:$(pwd)" >> $GITHUB_ENV
# FIXME: merge SO fixes and revert
uses: actions/checkout@v3
with:
repository: cerc-io/stack-orchestrator
ref: ${{ env.SO_VERSION }}
path: .tools/stack-orchestrator
- name: "Install stack orchestrator"
run: pip3 install .tools/stack-orchestrator
- name: Clone system-tests
uses: actions/checkout@v4
with:
repository: cerc-io/system-tests
ref: v0.1.0-20240411
path: ./system-tests
token: ${{ secrets.CICD_REPO_TOKEN }}
progress: false
- name: Clone fixturenet stack repo
uses: actions/checkout@v4
with:
repository: cerc-io/fixturenet-eth-stacks
ref: ${{ env.FIXTURENET_ETH_STACKS_VERSION }}
path: ./fixturenet-eth-stacks
progress: false
- name: Run testnet stack
working-directory: ./plugeth-statediff
run: ./scripts/run-test-stack.sh
- name: Run tests
working-directory: ./system-tests
run: |
pip install pytest
pip install -r requirements.txt
pytest -v -k test_basic_db
compliance-test:
name: Run compliance tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: ./plugeth-statediff
- uses: actions/checkout@v3
with:
repository: cerc-io/eth-statediff-compliance
ref: v0.2.0
path: ./eth-statediff-compliance
token: ${{ secrets.CICD_REPO_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version-file: './eth-statediff-compliance/go.mod'
check-latest: true
- name: Install jq
run: apt-get update && apt-get install -yq jq
- name: Update go.mod in nested modules
working-directory: ./eth-statediff-compliance/
run: |
set -x
./scripts/update-mod.sh ../plugeth-statediff dumpdiff-plugeth/
./scripts/update-mod.sh ../plugeth-statediff dumpdiff-plugeth-parallel/
- name: Build tools
working-directory: ./eth-statediff-compliance/
run: make all
- name: Compare output of geth and plugeth
working-directory: ./eth-statediff-compliance/
run: ./scripts/compare-diffs.sh geth plugeth
- name: Compare output of geth and plugeth-parallel
working-directory: ./eth-statediff-compliance/
run: ./scripts/compare-diffs.sh geth plugeth-parallel