Commit ef673e64 authored by madengji's avatar madengji Committed by 33cn

fix linter

parent 1bed9acf
......@@ -138,6 +138,24 @@ jobs:
make docker-compose dapp=paracross
make docker-compose-down dapp=paracross
ci_paracross_bls:
name: ci_paracross_bls
runs-on: ubuntu-latest
steps:
- name: Set up Golang
uses: actions/setup-go@v2
with:
go-version: 1.13
id: go
- name: set go env
run: export PATH=${PATH}:`go env GOPATH`/bin
- name: checkout
uses: actions/checkout@v2
- name: deploy
run: |
make docker-compose dapp=paracross extra=1
make docker-compose-down dapp=paracross
ci_x2ethereum:
name: ci_x2ethereum
runs-on: ubuntu-latest
......
......@@ -109,11 +109,12 @@ coverhtml: ## Generate global code coverage report in HTML
docker: ## build docker image for chain33 run
@sudo docker build . -f ./build/Dockerfile-run -t chain33:latest
#extra can make more test setting
docker-compose: ## build docker-compose for chain33 run
@cd build && if ! [ -d ci ]; then \
make -C ../ ; \
fi; \
cp chain33* Dockerfile docker-compose.yml *.sh ci/ && cd ci/ && ./docker-compose-pre.sh run $(proj) $(dapp) && cd ../..
cp chain33* Dockerfile docker-compose.yml *.sh ci/ && cd ci/ && ./docker-compose-pre.sh run $(proj) $(dapp) $(extra) && cd ../..
docker-compose-down: ## build docker-compose for chain33 run
@cd build && if [ -d ci ]; then \
......
......@@ -13,6 +13,7 @@ fi
OP="${1}"
PROJ="${2}"
DAPP="${3}"
EXTRA="${4}"
TESTCASEFILE="testcase.sh"
FORKTESTFILE="fork-test.sh"
......@@ -60,7 +61,7 @@ function run_dapp() {
exit 1
fi
elif [ "$test" == "$TESTCASEFILE" ]; then
if ! ./${DOCKER_COMPOSE_SH} "${PROJ}" "${app}"; then
if ! ./${DOCKER_COMPOSE_SH} "${PROJ}" "${app}" "${EXTRA}"; then
exit 1
fi
fi
......
......@@ -41,6 +41,12 @@ if [ -n "${2}" ]; then
DAPP=$2
fi
#EXTRA can do more test to dapp
EXTRA=""
if [ -n "${3}" ]; then
EXTRA=$3
fi
DAPP_TEST_FILE=""
if [ -n "${DAPP}" ]; then
DAPP_TEST_FILE="testcase.sh"
......@@ -66,6 +72,7 @@ fi
echo "=========== # env setting ============="
echo "DAPP=$DAPP"
echo "EXTRA=$EXTRA"
echo "DAPP_TEST_FILE=$DAPP_TEST_FILE"
echo "COMPOSE_FILE=$COMPOSE_FILE"
echo "COMPOSE_PROJECT_NAME=$COMPOSE_PROJECT_NAME"
......@@ -482,7 +489,7 @@ function main() {
echo "==============================DAPP=$DAPP main begin========================================================"
### init para ####
base_init
dapp_run init
dapp_run init "${EXTRA}"
### start docker ####
start
......
......@@ -27,17 +27,17 @@ fi
#source test-rpc.sh
function para_init() {
para_set_toml chain33.para33.toml "$PARANAME"
para_set_toml chain33.para32.toml "$PARANAME"
para_set_toml chain33.para31.toml "$PARANAME"
para_set_toml chain33.para30.toml "$PARANAME"
para_set_toml chain33.para33.toml "$PARANAME" "$1"
para_set_toml chain33.para32.toml "$PARANAME" "$1"
para_set_toml chain33.para31.toml "$PARANAME" "$1"
para_set_toml chain33.para30.toml "$PARANAME" "$1"
sed -i $xsedfix 's/^authAccount=.*/authAccount="1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"/g' chain33.para33.toml
sed -i $xsedfix 's/^authAccount=.*/authAccount="1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR"/g' chain33.para32.toml
sed -i $xsedfix 's/^authAccount=.*/authAccount="1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"/g' chain33.para31.toml
sed -i $xsedfix 's/^authAccount=.*/authAccount="1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"/g' chain33.para30.toml
para_set_toml chain33.para29.toml "$PARANAME_GAME"
para_set_toml chain33.para29.toml "$PARANAME_GAME" "$1"
sed -i $xsedfix 's/^authAccount=.*/authAccount="1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"/g' chain33.para29.toml
}
......@@ -55,6 +55,13 @@ function para_set_toml() {
sed -i $xsedfix 's/^mainBlockHashForkHeight=.*/mainBlockHashForkHeight=1/g' "${1}"
#blsSign case
if [ -n "$3" ]; then
echo "${1} blssign=$3"
sed -i $xsedfix '/types=\["dht"\]/!b;n;cenable=true' "${1}"
sed -i $xsedfix '/emptyBlockInterval=/!b;n;cblsSign=true' "${1}"
fi
#blockchain
sed -i $xsedfix 's/^enableReduceLocaldb=.*/enableReduceLocaldb=false/g' "${1}"
sed -i $xsedfix 's/^enablePushSubscribe=.*/enablePushSubscribe=true/g' "${1}"
......@@ -1093,7 +1100,7 @@ function para_test() {
function paracross() {
if [ "${2}" == "init" ]; then
para_init
para_init "${3}"
elif [ "${2}" == "config" ]; then
para_set_wallet
para_transfer
......
......@@ -6,7 +6,7 @@ package paracross
import (
"github.com/33cn/chain33/pluginmgr"
_ "github.com/33cn/plugin/plugin/crypto/bls"
_ "github.com/33cn/plugin/plugin/crypto/bls" // register bls package for ut usage
_ "github.com/33cn/plugin/plugin/dapp/paracross/autotest" // register autotest package
"github.com/33cn/plugin/plugin/dapp/paracross/commands"
"github.com/33cn/plugin/plugin/dapp/paracross/executor"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment