Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
ci(integration): cleanup integration test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed Sep 20, 2023
1 parent 2a435f5 commit a6c644d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
17 changes: 1 addition & 16 deletions .github/workflows/devnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions integration/test/devnet/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ services:

boost:
container_name: boost
platform: linux/amd64
image: ${BOOST_IMAGE}
init: true
ports:
Expand All @@ -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
Expand All @@ -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
Expand Down
17 changes: 17 additions & 0 deletions scripts/integration-setup.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a6c644d

Please sign in to comment.