From 3655aa7675f89999394e09e206cb2d358f6c2bed Mon Sep 17 00:00:00 2001 From: "Seungmin.Ryu" Date: Thu, 30 Jul 2020 12:50:50 +0900 Subject: [PATCH 1/2] update requires compatible on Makefile - compatible version with iconservice 1.7.0, iconrpcserver 1.5.0 - update iconsdk compatible version with 1.3.0 --- Makefile | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index de39fd695..26bca70e6 100644 --- a/Makefile +++ b/Makefile @@ -40,8 +40,8 @@ requirements: all: install generate-key requires: - $(PIP_INSTALL) iconservice==1.7.0 - $(PIP_INSTALL) iconrpcserver==1.5.0 + $(PIP_INSTALL) iconservice~=1.7.0 + $(PIP_INSTALL) iconrpcserver~=1.5.0 $(PIP_INSTALL) tbears ## pip install packages diff --git a/setup.py b/setup.py index 58e5a11dd..0d634ab55 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def run(self): 'setup_requires': setup_requires, 'install_requires': install_requires, 'extras_require': { - 'tests': ['iconsdk==1.1.0', 'pytest>=4.6.3', 'pytest-xprocess>=0.12.1', "pytest-benchmark", "pytest-mock", + 'tests': ['iconsdk~=1.3.0', 'pytest>=4.6.3', 'pytest-xprocess>=0.12.1', "pytest-benchmark", "pytest-mock", "pytest-asyncio", "freezegun"], }, 'entry_points': { From c69507f9c63bb1b910f05f596694cd71c94f73be Mon Sep 17 00:00:00 2001 From: "Seungmin.Ryu" Date: Thu, 30 Jul 2020 15:47:40 +0900 Subject: [PATCH 2/2] fixed to run conditional step on github workflow --- .github/workflows/citizen.yml | 16 +++++++++++----- .github/workflows/unit_test.yml | 2 +- Makefile | 5 +++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/citizen.yml b/.github/workflows/citizen.yml index b6822aeee..e0173dd0d 100644 --- a/.github/workflows/citizen.yml +++ b/.github/workflows/citizen.yml @@ -42,18 +42,24 @@ jobs: cd - icon_rc -version - - name: Install Loopchain + - if: ${{ github.base_ref == 'master' }} + name: Install Loopchain master run: | pwd - make develop + make install + - if: ${{ github.base_ref != 'master' }} + name: Install Loopchain develop + run: | + pwd + make develop - name: Generate-key run: | - sed "23 a\ \"PRIVATE_PASSWORD\": \"${pwd}\"," -i conf/mainnet/loopchain_conf.json + sed "23 a\ \"PRIVATE_PASSWORD\": \"${PWD}\"," -i conf/mainnet/loopchain_conf.json cat conf/mainnet/loopchain_conf.json - pip install tbears - tbears keystore -p ${pwd} my_keystore.json + python -c "import os; from iconsdk.wallet.wallet import KeyWallet; \ + KeyWallet.create().store('my_keystore.json', os.getenv('PWD'))" env: pwd: Most_safest_pw_in_the_wor1d diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index dc6705b5c..717953dd5 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -16,7 +16,7 @@ jobs: echo "::set-env name=PR_PATH::https://github.com/${GITHUB_REPOSITORY}/pull/${pr_num}" - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: 3.7 diff --git a/Makefile b/Makefile index 26bca70e6..f91ca7d1e 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ all: install generate-key requires: $(PIP_INSTALL) iconservice~=1.7.0 $(PIP_INSTALL) iconrpcserver~=1.5.0 - $(PIP_INSTALL) tbears + $(PIP_INSTALL) iconsdk~=1.3.0 ## pip install packages install: $(INSTALL_REQUIRES) @@ -64,7 +64,8 @@ generate-proto: ## Generate a key generate-key: @file="my_keystore.json"; $(RM) $${file} > /dev/null; \ - tbears keystore $${file}; \ + python -c "import getpass; from iconsdk.wallet.wallet import KeyWallet; \ + KeyWallet.create().store('$${file}', getpass.getpass('Input your keystore password: '))"; \ cat $${file} ## Check loopchain & gunicorn & rabbitmq processes