This commit is contained in:
Roy Crihfield 2023-05-26 18:10:16 +08:00
parent 4c814bbe15
commit 1fe599dd71
3 changed files with 27 additions and 28 deletions

View File

@ -13,7 +13,7 @@ jobs:
go-version-file: 'go.mod' go-version-file: 'go.mod'
check-latest: true check-latest: true
- name: "Run DB container" - name: "Run DB container"
run: docker compose -f test/compose-db.yml up --wait run: docker compose -f test/compose-db.yml up --wait --quiet-pull
- name: "Build and run tests" - name: "Build and run tests"
run: | run: |
go install github.com/onsi/ginkgo/v2/ginkgo go install github.com/onsi/ginkgo/v2/ginkgo
@ -39,20 +39,18 @@ jobs:
path: ./stack-orchestrator path: ./stack-orchestrator
- run: pip install ./stack-orchestrator - run: pip install ./stack-orchestrator
- name: "Run testnet stack" - name: "Run testnet stack"
env:
LACONIC_SO: laconic-so
run: ./scripts/integration-setup.sh run: ./scripts/integration-setup.sh
- name: "Build and run server" - name: "Build and run server"
env: env:
ETH_FORWARD_ETH_CALLS: false ETH_FORWARD_ETH_CALLS: false
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}" ETH_CHAIN_ID: ${{ env.ETH_CHAIN_ID }}
ETH_CHAIN_CONFIG: "${{ env.ETH_CHAIN_CONFIG }}" ETH_CHAIN_CONFIG: ${{ env.ETH_CHAIN_CONFIG }}
DEPLOYER_PRIVATE_KEY: "${{ env.DEPLOYER_PRIVATE_KEY }}" DEPLOYER_PRIVATE_KEY: ${{ env.DEPLOYER_PRIVATE_KEY }}
run: docker compose -f test/compose-server.yml up --wait run: docker compose -f test/compose-server.yml up --wait --quiet-pull
- name: "Run tests" - name: "Run tests"
env: env:
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}" ETH_CHAIN_ID: ${{ env.ETH_CHAIN_ID }}
ETH_HTTP_PATH: "${{ env.ETH_HTTP_PATH }}" ETH_HTTP_PATH: ${{ env.ETH_HTTP_PATH }}
run: | run: |
go install github.com/onsi/ginkgo/v2/ginkgo go install github.com/onsi/ginkgo/v2/ginkgo
ginkgo -v --label-filter '!proxy' -r ./integration ginkgo -v --label-filter '!proxy' -r ./integration
@ -75,20 +73,19 @@ jobs:
- run: pip install ./stack-orchestrator - run: pip install ./stack-orchestrator
- name: "Run testnet stack" - name: "Run testnet stack"
env: env:
LACONIC_SO: laconic-so
CERC_RUN_STATEDIFF: false CERC_RUN_STATEDIFF: false
run: ./scripts/integration-setup.sh run: ./scripts/integration-setup.sh
- name: "Build and run server" - name: "Build and run server"
env: env:
ETH_FORWARD_ETH_CALLS: true ETH_FORWARD_ETH_CALLS: true
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}" ETH_CHAIN_ID: ${{ env.ETH_CHAIN_ID }}
ETH_CHAIN_CONFIG: "${{ env.ETH_CHAIN_CONFIG }}" ETH_CHAIN_CONFIG: ${{ env.ETH_CHAIN_CONFIG }}
DEPLOYER_PRIVATE_KEY: "${{ env.DEPLOYER_PRIVATE_KEY }}" DEPLOYER_PRIVATE_KEY: ${{ env.DEPLOYER_PRIVATE_KEY }}
run: docker compose -f test/compose-server.yml up --wait run: docker compose -f test/compose-server.yml up --wait --quiet-pull
- name: "Run tests" - name: "Run tests"
env: env:
ETH_CHAIN_ID: "${{ env.ETH_CHAIN_ID }}" ETH_CHAIN_ID: ${{ env.ETH_CHAIN_ID }}
ETH_HTTP_PATH: "${{ env.ETH_HTTP_PATH }}" ETH_HTTP_PATH: ${{ env.ETH_HTTP_PATH }}
run: | run: |
go install github.com/onsi/ginkgo/v2/ginkgo go install github.com/onsi/ginkgo/v2/ginkgo
ginkgo -v --label-filter 'proxy' -r ./integration ginkgo -v --label-filter 'proxy' -r ./integration

View File

@ -2,8 +2,10 @@
set -e set -e
export DOCKER_BUILDKIT=1
# Prevent conflicting tty output # Prevent conflicting tty output
export BUILDKIT_PROGRESS=plain export BUILDKIT_PROGRESS=plain
# By default assume we are running in the project root # By default assume we are running in the project root
export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-..}" export CERC_REPO_BASE_DIR="${CERC_REPO_BASE_DIR:-..}"
@ -18,16 +20,16 @@ set -x
# Build and deploy a cluster with only what we need from the stack # Build and deploy a cluster with only what we need from the stack
$laconic_so setup-repositories \ $laconic_so setup-repositories \
--exclude cerc-io/ipld-eth-server,cerc-io/tx-spammer \ --exclude cerc-io/ipld-eth-server,cerc-io/tx-spammer \
--branches-file ./test/stack-refs.yml --branches-file ./test/stack-refs.yml
$laconic_so build-containers \ $laconic_so build-containers \
--exclude cerc/ipld-eth-server,cerc/keycloak,cerc/tx-spammer --exclude cerc/ipld-eth-server,cerc/keycloak,cerc/tx-spammer
$laconic_so deploy \ $laconic_so deploy \
--include fixturenet-eth,ipld-eth-db \ --include fixturenet-eth,ipld-eth-db \
--env-file $CONFIG_DIR/stack.env \ --env-file $CONFIG_DIR/stack.env \
--cluster test up --cluster test up
set +x set +x
@ -39,9 +41,9 @@ curl -s $bootnode_endpoint/geth.json | jq '.config' > $CONFIG_DIR/chain.json
# Output vars if we are running on Github # Output vars if we are running on Github
if [[ -n "$GITHUB_ENV" ]]; then if [[ -n "$GITHUB_ENV" ]]; then
echo ETH_CHAIN_ID="$(jq '.chainId' $CONFIG_DIR/chain.json)" >> "$GITHUB_ENV" echo ETH_CHAIN_ID="$(jq '.chainId' $CONFIG_DIR/chain.json)" >> "$GITHUB_ENV"
echo ETH_CHAIN_CONFIG="$CONFIG_DIR/chain.json" >> "$GITHUB_ENV" echo ETH_CHAIN_CONFIG="'$CONFIG_DIR/chain.json'" >> "$GITHUB_ENV"
echo ETH_HTTP_PATH="$(docker port test-fixturenet-eth-geth-1-1 8545 | head -1)" >> "$GITHUB_ENV" echo ETH_HTTP_PATH="$(docker port test-fixturenet-eth-geth-1-1 8545 | head -1)" >> "$GITHUB_ENV"
# Read a private key so we can send from a funded account # Read a private key so we can send from a funded account
echo DEPLOYER_PRIVATE_KEY="$(curl -s $bootnode_endpoint/accounts.csv | head -1 | cut -d',' -f3)" >> "$GITHUB_ENV" echo DEPLOYER_PRIVATE_KEY="$(curl -s $bootnode_endpoint/accounts.csv | head -1 | cut -d',' -f3)" >> "$GITHUB_ENV"
fi fi

View File

@ -1,4 +1,4 @@
# Container to run the IPLD server as part of integration tests # Runs the IPLD server and contract deployment server
services: services:
ipld-eth-server: ipld-eth-server: