diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 405e3611..b7dad7b7 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -98,6 +98,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -115,6 +116,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test @@ -165,6 +167,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -182,6 +185,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test @@ -232,6 +236,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -251,6 +256,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test diff --git a/test/README.md b/test/README.md index 05157170..3c5030bf 100644 --- a/test/README.md +++ b/test/README.md @@ -27,7 +27,18 @@ - Run integration tests: - - Update (Replace existing content) config file [config.sh](https://github.com/vulcanize/stack-orchestrator/blob/main/config.sh) in stack-orchestrator repo: + - In stack-orchestrator repo, create config file: + + ```bash + cd helper-scripts + + ./create-config.sh + ``` + + A `config.sh` will be created in the root directory. + + - Update/Edit the generated config file with: + ```bash #!/bin/bash @@ -37,13 +48,17 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=true eth_forward_eth_calls=false eth_proxy_on_error=false eth_http_path="go-ethereum:8545" - ``` + ``` - Run stack-orchestrator: + ```bash # In stack-orchestrator root directory. cd helper-scripts @@ -53,17 +68,20 @@ -d ../docker/latest/docker-compose-db.yml \ -d ../docker/local/docker-compose-go-ethereum.yml \ -d ../docker/local/docker-compose-ipld-eth-server.yml \ + -d ../docker/local/docker-compose-contract.yml \ -v remove \ -p ../config.sh ``` - Run test: + ```bash # In ipld-eth-server root directory. ./scripts/run_integration_test.sh ``` - - Update `config.sh` file: + - Update stack-orchestrator `config.sh` file: + ```bash #!/bin/bash @@ -73,6 +91,9 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=false eth_forward_eth_calls=true eth_proxy_on_error=false @@ -86,7 +107,7 @@ ./scripts/run_integration_test_forward_eth_calls.sh ``` - - Update `config.sh` file: + - Update stack-orchestrator `config.sh` file: ```bash #!/bin/bash @@ -96,6 +117,9 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=true eth_forward_eth_calls=false eth_proxy_on_error=false