mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
using spree for running examples
This commit is contained in:
parent
34745f3b66
commit
3cf578cfae
@ -21,7 +21,7 @@ before_script:
|
|||||||
- ganache-cli --port 18545 > ganache-cli.log &
|
- ganache-cli --port 18545 > ganache-cli.log &
|
||||||
- git clone https://github.com/oceanprotocol/barge
|
- git clone https://github.com/oceanprotocol/barge
|
||||||
- cd barge
|
- cd barge
|
||||||
- bash -x start_ocean.sh --latest --no-brizo --no-pleuston --local-nile-node 2>&1 > start_ocean.log &
|
- bash -x start_ocean.sh --latest --no-brizo --no-pleuston --local-spree-node 2>&1 > start_ocean.log &
|
||||||
- cd ..
|
- cd ..
|
||||||
|
|
||||||
script:
|
script:
|
||||||
@ -29,6 +29,7 @@ script:
|
|||||||
- npm run report-coverage
|
- npm run report-coverage
|
||||||
- npm run build
|
- npm run build
|
||||||
- npm run doc
|
- npm run doc
|
||||||
|
- ./scripts/wait_for_migration_and_extract_keeper_artifacts.sh
|
||||||
- npm run integration
|
- npm run integration
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
|
21
scripts/wait_for_migration_and_extract_keeper_artifacts.sh
Executable file
21
scripts/wait_for_migration_and_extract_keeper_artifacts.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
RETRY_COUNT=0
|
||||||
|
COMMAND_STATUS=1
|
||||||
|
|
||||||
|
mkdir -p artifacts
|
||||||
|
|
||||||
|
until [ $COMMAND_STATUS -eq 0 ] || [ $RETRY_COUNT -eq 120 ]; do
|
||||||
|
keeper_contracts_docker_id=$(docker container ls | grep keeper-contracts | awk '{print $1}')
|
||||||
|
docker cp ${keeper_contracts_docker_id}:/keeper-contracts/artifacts/ready ./artifacts/
|
||||||
|
COMMAND_STATUS=$?
|
||||||
|
sleep 5
|
||||||
|
let RETRY_COUNT=RETRY_COUNT+1
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $COMMAND_STATUS -ne 0 ]; then
|
||||||
|
echo "Waited for more than two minutes, but keeper contracts have not been migrated yet. Did you run an Ethereum RPC client and the migration script?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker cp ${keeper_contracts_docker_id}:/keeper-contracts/artifacts/. ./node_modules/@oceanprotocol/keeper-contracts/artifacts/
|
@ -4,14 +4,12 @@ import * as config from "./config/config.json"
|
|||||||
|
|
||||||
if (process.env.SEED_WORDS) {
|
if (process.env.SEED_WORDS) {
|
||||||
const seedphrase = process.env.SEED_WORDS
|
const seedphrase = process.env.SEED_WORDS
|
||||||
// There are 20 accounts availabe (19 + 1)
|
|
||||||
const accountIndex = Math.floor(Math.random() * 19)
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
config.web3Provider = new HDWalletProvider(
|
config.web3Provider = new HDWalletProvider(
|
||||||
seedphrase,
|
seedphrase,
|
||||||
config.nodeUri,
|
config.nodeUri,
|
||||||
accountIndex,
|
0,
|
||||||
2,
|
2,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,15 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# this has to go first
|
# First of all to log the accounts
|
||||||
|
npm run run src/examples/GetAccounts.ts
|
||||||
|
|
||||||
|
# Before rest of examples
|
||||||
npm run run src/examples/RegisterServiceAgreementTemplates.ts
|
npm run run src/examples/RegisterServiceAgreementTemplates.ts
|
||||||
|
|
||||||
|
# Examples
|
||||||
npm run run src/examples/BuyAsset.ts
|
npm run run src/examples/BuyAsset.ts
|
||||||
npm run run src/examples/ExecuteAgreement.ts
|
npm run run src/examples/ExecuteAgreement.ts
|
||||||
npm run run src/examples/GetAccounts.ts
|
|
||||||
npm run run src/examples/GetBalance.ts
|
npm run run src/examples/GetBalance.ts
|
||||||
# npm run run src/examples/GrantAccess.ts
|
# npm run run src/examples/GrantAccess.ts
|
||||||
npm run run src/examples/RegisterAsset.ts
|
npm run run src/examples/RegisterAsset.ts
|
||||||
|
Loading…
Reference in New Issue
Block a user