diff --git a/.github/workflows/devnet-test.yml b/.github/workflows/devnet-test.yml index 2f0dde2..6d998a9 100644 --- a/.github/workflows/devnet-test.yml +++ b/.github/workflows/devnet-test.yml @@ -40,22 +40,7 @@ jobs: docker compose exec lotus lotus wait-api --timeout=20m - name: Set up Motion Wallet and API endpoints run: | - cd integration/test/devnet - # Setup Lotus API token - export `docker compose exec lotus lotus auth api-info --perm=admin` - IFS=: read -r token path <<< "${FULLNODE_API_INFO}" - echo "LOTUS_TOKEN=${token}" >> $GITHUB_ENV - - # Setup Motion Wallet - MOTION_WALLET_ADDR=`docker compose exec lotus lotus wallet new` - MOTION_WALLET_KEY=`docker compose exec lotus lotus wallet export ${MOTION_WALLET_ADDR}` - LOTUS_WALLET_DEFAULT_ADDR=`docker compose exec lotus lotus wallet default` - docker compose exec lotus lotus send --from=${LOTUS_WALLET_DEFAULT_ADDR} ${MOTION_WALLET_ADDR} 10 - echo "MOTION_WALLET_ADDR=${MOTION_WALLET_ADDR}" >> $GITHUB_ENV - echo "MOTION_WALLET_KEY=${MOTION_WALLET_KEY}" >> $GITHUB_ENV - echo "MOTION_STORAGE_PROVIDERS=t01000" >> $GITHUB_ENV - echo "MOTION_API_ENDPOINT=http://localhost:40080" >> $GITHUB_ENV - echo "SINGULARITY_API_ENDPOINT=http://localhost:9091" >> $GITHUB_ENV + ./scripts/integration-setup.sh "${GITHUB_ENV}" - name: Run Motionlarity run: | cd integration/test/motionlarity diff --git a/integration/test/devnet/docker-compose.yaml b/integration/test/devnet/docker-compose.yaml index f77c738..3818002 100644 --- a/integration/test/devnet/docker-compose.yaml +++ b/integration/test/devnet/docker-compose.yaml @@ -61,6 +61,7 @@ services: boost: container_name: boost + platform: linux/amd64 image: ${BOOST_IMAGE} init: true ports: @@ -83,6 +84,7 @@ services: - ./data/sample:/app/public:rw booster-http: + platform: linux/amd64 container_name: booster-http image: ${BOOSTER_HTTP_IMAGE} init: true @@ -101,6 +103,7 @@ services: - ./data/lotus-miner:/var/lib/lotus-miner:ro booster-bitswap: + platform: linux/amd64 container_name: booster-bitswap image: ${BOOSTER_BITSWAP_IMAGE} init: true diff --git a/scripts/integration-setup.sh b/scripts/integration-setup.sh new file mode 100755 index 0000000..8be0995 --- /dev/null +++ b/scripts/integration-setup.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +cd integration/test/devnet +# Setup Lotus API token +export `docker compose exec lotus lotus auth api-info --perm=admin` +IFS=: read -r token path <<< "${FULLNODE_API_INFO}" +# Setup Motion Wallet +MOTION_WALLET_ADDR=`docker compose exec lotus lotus wallet new` +MOTION_WALLET_KEY=`docker compose exec lotus lotus wallet export ${MOTION_WALLET_ADDR}` +LOTUS_WALLET_DEFAULT_ADDR=`docker compose exec lotus lotus wallet default` +docker compose exec lotus lotus send --from=${LOTUS_WALLET_DEFAULT_ADDR} ${MOTION_WALLET_ADDR} 10 +echo "LOTUS_TOKEN=${token}" >> $1 +echo "MOTION_WALLET_ADDR=${MOTION_WALLET_ADDR}" >> $1 +echo "MOTION_WALLET_KEY=${MOTION_WALLET_KEY}" >> $1 +echo "MOTION_STORAGE_PROVIDERS=t01000" >> $1 +echo "MOTION_API_ENDPOINT=http://localhost:40080" >> $1 +echo "SINGULARITY_API_ENDPOINT=http://localhost:9091" >> $1 \ No newline at end of file