Security: Remove web3 v1.x #595
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Integration_test_local_full_node | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
test-e2e: | |
name: End-to-end Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Golang | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.15.5 | |
- name: Checkout chain-main repository | |
uses: actions/checkout@v2 | |
with: | |
repository: crypto-com/chain-main | |
path: chain-main | |
ref: v1.2.1 | |
submodules: recursive | |
- name: Build and start chain-maind | |
run: | | |
sudo apt-get install jq | |
cd chain-main | |
rm -rf $HOME/.chain-maind | |
NETWORK=testnet make install | |
NETWORK=testnet make build | |
./build/chain-maind unsafe-reset-all | |
./build/chain-maind init testnode --chain-id testnet -o | |
./build/chain-maind keys add validator --keyring-backend test --output json >> ./validator.json | |
./build/chain-maind keys add ecosystem --keyring-backend test --output json >> ./ecosystem.json | |
./build/chain-maind keys add launch --keyring-backend test --output json >> ./launch.json | |
./build/chain-maind keys add community --keyring-backend test --output json >> ./community.json | |
./build/chain-maind keys add reserve --keyring-backend test --output json >> ./reserve.json | |
./build/chain-maind add-genesis-account $(./build/chain-maind keys show validator -a --keyring-backend test) 200tcro | |
./build/chain-maind add-genesis-account $(./build/chain-maind keys show ecosystem -a --keyring-backend test) 200tcro | |
./build/chain-maind add-genesis-account $(./build/chain-maind keys show launch -a --keyring-backend test) 200tcro | |
./build/chain-maind add-genesis-account $(./build/chain-maind keys show community -a --keyring-backend test) 200tcro | |
./build/chain-maind add-genesis-account $(./build/chain-maind keys show reserve -a --keyring-backend test) 200tcro | |
# Issue: gentx denomination is ignored https://github.com/cosmos/cosmos-sdk/issues/8251 | |
./build/chain-maind gentx validator 100tcro --amount 100tcro --keyring-backend test --chain-id testnet | |
./build/chain-maind collect-gentxs | |
./build/chain-maind validate-genesis | |
./build/chain-maind start --trace & | |
- name: Transfer funds to Test accounts | |
run: | | |
## Sleep 5 Seconds | |
sleep 5 | |
curl --location --request GET 'localhost:26657/status' | jq '.' | |
cd chain-main | |
./build/chain-maind keys show validator --bech val --keyring-backend test --output json | jq '.'>> ./validatorDetails.json | |
## TRANSFER 100CRO FROM "ecosystem" to "tcro1n0jfe772qx5svnme9y2gl75u85luxfjnhkacy0" | |
./build/chain-maind tx bank send $(./build/chain-maind keys show ecosystem -a --keyring-backend test) tcro1n0jfe772qx5svnme9y2gl75u85luxfjnhkacy0 100tcro --keyring-backend test --chain-id testnet -y | jq '.' | |
## TRANSFER 100CRO FROM "ecosystem" to "tcro17c6rn92lnw0d8ct37mlycdaeau4f9hm569ef9s" | |
./build/chain-maind tx bank send $(./build/chain-maind keys show ecosystem -a --keyring-backend test) tcro17c6rn92lnw0d8ct37mlycdaeau4f9hm569ef9s 100tcro --keyring-backend test --chain-id testnet -y | jq '.' | |
## TRANSFER 10CRO FROM "reserve" to "tcro1c5nd9l5ylh8udw5lsfs0hlvzxwrlymxqlnl266" | |
./build/chain-maind tx bank send $(./build/chain-maind keys show reserve -a --keyring-backend test) tcro1c5nd9l5ylh8udw5lsfs0hlvzxwrlymxqlnl266 100tcro --keyring-backend test --chain-id testnet -y | jq '.' | |
- name: Checkout this project | |
uses: actions/checkout@v2 | |
with: | |
path: jslib | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- uses: actions/cache@v2 | |
id: cache-deps | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node${{ matrix.code }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Run e2e test suite | |
run: | | |
cd jslib | |
npm install --no-progress --silent --quiet | |
VALIDATOR_OPERATOR_ADDRESS=$(../chain-main/build/chain-maind keys show validator -a --bech val --keyring-backend test) COMMUNITY_ACCOUNT_MNEMONIC=$(cat ../chain-main/community.json | jq '.mnemonic') RESERVE_ACCOUNT_MNEMONIC=$(cat ../chain-main/reserve.json | jq '.mnemonic') ECOSYSTEM_ACCOUNT_MNEMONIC=$(cat ../chain-main/ecosystem.json | jq '.mnemonic') | |
echo "VALIDATOR_OPERATOR_ADDRESS: $VALIDATOR_OPERATOR_ADDRESS" | |
echo "COMMUNITY_ACCOUNT_MNEMONIC: $COMMUNITY_ACCOUNT_MNEMONIC" | |
echo "RESERVE_ACCOUNT_MNEMONIC: $RESERVE_ACCOUNT_MNEMONIC" | |
echo "ECOSYSTEM_ACCOUNT_MNEMONIC: $ECOSYSTEM_ACCOUNT_MNEMONIC" | |
# COMMUNITY_ACCOUNT_MNEMONIC=$COMMUNITY_ACCOUNT_MNEMONIC RESERVE_ACCOUNT_MNEMONIC=$RESERVE_ACCOUNT_MNEMONIC ECOSYSTEM_ACCOUNT_MNEMONIC=$ECOSYSTEM_ACCOUNT_MNEMONIC | |
VALIDATOR_OPERATOR_ADDRESS=$VALIDATOR_OPERATOR_ADDRESS npm run test:e2e |