Roy Crihfield
6d7487152c
Now uses: * ipld direct_by_leaf StateDB for basic queries * trie_by_cid StateDB for trie slice and proof queries Also: * vulcanize => cerc refactor * Backend method to close dbs * state tests are in multiple packages, to allow separate ginkgo suites * removes gap-filler module * integration tests and github workflows * run stack-orchestrator for testnet * fix various issues with tests, hardhat server, dockerfile * fix cmd flags / env vars * fix flaky tests and clean up code * remove unused code, scripts * remove outdated docs * update version
95 lines
3.1 KiB
YAML
95 lines
3.1 KiB
YAML
name: Test the stack.
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
test:
|
|
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-db.yml up --wait
|
|
- name: "Build and run tests"
|
|
run: |
|
|
go install github.com/onsi/ginkgo/v2/ginkgo
|
|
ginkgo -v -r --skipPackage=./test
|
|
|
|
integration-test:
|
|
name: "Run integration 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: "Install stack-orchestrator"
|
|
# FIXME: using my dev branch for v5 migration changes until a release has them
|
|
# run: |
|
|
# curl -L -O https://github.com/cerc-io/stack-orchestrator/releases/latest/download/laconic-so
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: cerc-io/stack-orchestrator
|
|
ref: roy/for-ci
|
|
path: ./stack-orchestrator
|
|
- run: pip install ./stack-orchestrator
|
|
- name: "Run testnet stack"
|
|
env:
|
|
LACONIC_SO: laconic-so
|
|
run: ./scripts/integration-setup.sh
|
|
- name: "Build and run server"
|
|
env:
|
|
ETH_FORWARD_ETH_CALLS: false
|
|
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}"
|
|
ETH_CHAIN_CONFIG: "${{ env.ETH_CHAIN_CONFIG }}"
|
|
DEPLOYER_PRIVATE_KEY: "${{ env.DEPLOYER_PRIVATE_KEY }}"
|
|
run: docker compose -f test/compose-server.yml up --wait
|
|
- name: "Run tests"
|
|
env:
|
|
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}"
|
|
ETH_HTTP_PATH: "${{ env.ETH_HTTP_PATH }}"
|
|
run: |
|
|
go install github.com/onsi/ginkgo/v2/ginkgo
|
|
ginkgo -v --label-filter '!proxy' -r ./test
|
|
|
|
integration-test-eth-proxy:
|
|
name: "Run direct-proxy integration 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: "Install stack-orchestrator"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: cerc-io/stack-orchestrator
|
|
ref: roy/for-ci
|
|
path: ./stack-orchestrator
|
|
- run: pip install ./stack-orchestrator
|
|
- name: "Run testnet stack"
|
|
env:
|
|
LACONIC_SO: laconic-so
|
|
CERC_RUN_STATEDIFF: false
|
|
run: ./scripts/integration-setup.sh
|
|
- name: "Build and run server"
|
|
env:
|
|
ETH_FORWARD_ETH_CALLS: true
|
|
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}"
|
|
ETH_CHAIN_CONFIG: "${{ env.ETH_CHAIN_CONFIG }}"
|
|
DEPLOYER_PRIVATE_KEY: "${{ env.DEPLOYER_PRIVATE_KEY }}"
|
|
run: docker compose -f test/compose-server.yml up --wait
|
|
- name: "Run tests"
|
|
env:
|
|
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}"
|
|
ETH_HTTP_PATH: "${{ env.ETH_HTTP_PATH }}"
|
|
run: |
|
|
go install github.com/onsi/ginkgo/v2/ginkgo
|
|
ginkgo -v --label-filter 'proxy' -r ./test
|