Roy Crihfield
cd195a0fc0
Patch for module conflict when used as a dependency: `github.com/ethereum/c-kzg-4844/bindings/go` was moved to become part of `github.com/ethereum/c-kzg-4844` by `v0.4.0`.
See:
- cerc-io/plugeth#8
- 6ea035f208
```
% go mod tidy
go: github.com/cerc-io/ipld-eth-db-validator/v5/internal/chaingen imports
github.com/ethereum/go-ethereum/core imports
github.com/ethereum/go-ethereum/crypto/kzg4844 imports
github.com/ethereum/c-kzg-4844/bindings/go: ambiguous import: found package github.com/ethereum/c-kzg-4844/bindings/go in multiple modules:
github.com/ethereum/c-kzg-4844 v0.4.0 (/Users/roy/golang/pkg/mod/github.com/ethereum/c-kzg-4844@v0.4.0/bindings/go)
github.com/ethereum/c-kzg-4844/bindings/go v0.0.0-20230126171313-363c7d7593b4 (/Users/roy/golang/pkg/mod/github.com/ethereum/c-kzg-4844/bindings/go@v0.0.0-20230126171313-363c7d7593b4)
```
Also adds test utils from https://git.vdb.to/cerc-io/ipld-eth-db-validator to be shared by cerc-io/ipld-eth-statedb#5 and wherever else.
Reviewed-on: #24
105 lines
3.0 KiB
YAML
105 lines
3.0 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches: '*'
|
|
push:
|
|
branches:
|
|
- main
|
|
- ci-test
|
|
|
|
env:
|
|
SO_VERSION: v1.1.0-87fffca-202404110321
|
|
|
|
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@v3
|
|
with:
|
|
path: ./plugeth-statediff
|
|
- name: Build docker image
|
|
run: |
|
|
docker build ./plugeth-statediff -t cerc/plugeth-statediff:local
|
|
|
|
- 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
|
|
- name: Clone system-tests
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: cerc-io/system-tests
|
|
ref: v0.1.0-20240411
|
|
path: ./system-tests
|
|
token: ${{ secrets.CICD_REPO_TOKEN }}
|
|
- name: Run testnet stack
|
|
working-directory: ./plugeth-statediff
|
|
env:
|
|
LACONIC_SO: ../laconic-so
|
|
run: ./scripts/integration-setup.sh
|
|
- name: Install Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.11
|
|
|
|
- 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
|