ipld-eth-server/.github/workflows/tests.yaml

95 lines
3.1 KiB
YAML
Raw Normal View History

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
2023-03-31 14:48:41 +00:00
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