92 lines
3.1 KiB
YAML
92 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 --quiet-pull
|
|
- name: "Build and run tests"
|
|
run: |
|
|
go install github.com/onsi/ginkgo/v2/ginkgo
|
|
ginkgo -v -r --skipPackage=./integration
|
|
|
|
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/ipld-eth-ci
|
|
path: ./stack-orchestrator
|
|
- run: pip install ./stack-orchestrator
|
|
- name: "Run testnet stack"
|
|
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 --quiet-pull
|
|
- 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 ./integration
|
|
|
|
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/ipld-eth-ci
|
|
path: ./stack-orchestrator
|
|
- run: pip install ./stack-orchestrator
|
|
- name: "Run testnet stack"
|
|
env:
|
|
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 --quiet-pull
|
|
- 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 ./integration
|