-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github actions implementation_dev (#47)
* push actual test_sdk_client.py version to the dev branch * yml * Rename main.yml to master.yml * Update reset_environment.sh * Update run_all_functional.sh * Update reset_environment.sh * Update dev.yml * Update dev.yml * Update master.yml * Update reset_environment.sh * test * Update master.yml * Update dev.yml --------- Co-authored-by: Pavel Yagunov <[email protected]> Co-authored-by: Valery Geraskin <[email protected]> Co-authored-by: PAY2109 <[email protected]>
- Loading branch information
1 parent
29788fe
commit 3f4b03f
Showing
5 changed files
with
185 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: tests_development | ||
on: | ||
# push: | ||
# branches: [ "development" ] | ||
pull_request: | ||
branches: [ "development" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run_tests_development: | ||
runs-on: ubuntu-latest | ||
container: node:20-bookworm | ||
steps: | ||
|
||
- name: install packs | ||
run: | | ||
apt update | ||
apt install -y libudev-dev libusb-1.0-0-dev curl jq | ||
apt install -y python3-pip python3.11-venv | ||
echo DEV | ||
- name: install ipfs | ||
run: | | ||
wget https://dist.ipfs.io/go-ipfs/v0.9.0/go-ipfs_v0.9.0_linux-amd64.tar.gz | ||
tar -xvzf go-ipfs_v0.9.0_linux-amd64.tar.gz | ||
bash go-ipfs/install.sh | ||
ipfs --version | ||
node --version | ||
- name: clone repo | ||
uses: actions/checkout@v3 | ||
|
||
# - name: install platform-contracts | ||
# run: | | ||
# cd .. | ||
# git clone https://github.com/singnet/platform-contracts.git | ||
# cd platform-contracts | ||
# npm install | ||
# npm install ganache-cli | ||
# npm run-script compile | ||
|
||
# - name: build example service | ||
# run: | | ||
# git clone https://github.com/singnet/example-service.git | ||
# cd example-service | ||
# pip3 install -r requirements.txt --break-system-packages | ||
# sh buildproto.sh | ||
|
||
- name: Set up for snet daemon | ||
run: | | ||
cd .. | ||
mkdir snet-daemon | ||
cd snet-daemon | ||
wget https://github.com/singnet/snet-daemon/releases/download/v5.0.1/snet-daemon-v5.0.1-linux-amd64.tar.gz | ||
tar -xvf snet-daemon-v5.0.1-linux-amd64.tar.gz | ||
cd snet-daemon-v5.0.1-linux-amd64 | ||
cp ../../snet-sdk-python/testcases/functional_tests/snetd.config.json . | ||
- name: install pip packages | ||
run: | | ||
pip3 install -r requirements.txt --break-system-packages | ||
# mkdir ~/.snet | ||
# cp ./testcases/utils/config ~/.snet/ | ||
# cat ~/.snet/config | ||
- name: install snet-sdk | ||
run: pip3 install -e . --break-system-packages | ||
|
||
- name: functional tests for sdk | ||
run: | | ||
export SNET_TEST_WALLET_PRIVATE_KEY=${{ secrets.PRIV_KEY }} | ||
export SNET_TEST_INFURA_KEY=${{ secrets.INF_KEY }} | ||
export FORMER_SNET_TEST_INFURA_KEY=${{ secrets.FORM_INF_KEY }} | ||
export PIP_BREAK_SYSTEM_PACKAGES=1 | ||
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | ||
sh -ex ./testcases/utils/run_all_functional.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: tests_master | ||
on: | ||
# push: | ||
# branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run_tests_master: | ||
runs-on: ubuntu-latest | ||
container: node:20-bookworm | ||
steps: | ||
|
||
- name: install packs | ||
run: | | ||
apt update | ||
apt install -y libudev-dev libusb-1.0-0-dev curl jq | ||
apt install -y python3-pip python3.11-venv | ||
echo MASTER | ||
- name: install ipfs | ||
run: | | ||
wget https://dist.ipfs.io/go-ipfs/v0.9.0/go-ipfs_v0.9.0_linux-amd64.tar.gz | ||
tar -xvzf go-ipfs_v0.9.0_linux-amd64.tar.gz | ||
bash go-ipfs/install.sh | ||
ipfs --version | ||
node --version | ||
- name: clone repo | ||
uses: actions/checkout@v3 | ||
|
||
# - name: install platform-contracts | ||
# run: | | ||
# cd .. | ||
# git clone https://github.com/singnet/platform-contracts.git | ||
# cd platform-contracts | ||
# npm install | ||
# npm install ganache-cli | ||
# npm run-script compile | ||
|
||
# - name: build example service | ||
# run: | | ||
# git clone https://github.com/singnet/example-service.git | ||
# cd example-service | ||
# pip3 install -r requirements.txt --break-system-packages | ||
# sh buildproto.sh | ||
|
||
|
||
- name: Set up for snet daemon | ||
run: | | ||
cd .. | ||
mkdir snet-daemon | ||
cd snet-daemon | ||
wget https://github.com/singnet/snet-daemon/releases/download/v5.0.1/snet-daemon-v5.0.1-linux-amd64.tar.gz | ||
tar -xvf snet-daemon-v5.0.1-linux-amd64.tar.gz | ||
cd snet-daemon-v5.0.1-linux-amd64 | ||
cp ../../snet-sdk-python/testcases/functional_tests/snetd.config.json . | ||
- name: install pip packages | ||
run: | | ||
pip3 install -r requirements.txt --break-system-packages | ||
# mkdir ~/.snet | ||
# cp ./testcases/utils/config ~/.snet/ | ||
# cat ~/.snet/config | ||
- name: install snet-sdk | ||
run: pip3 install -e . --break-system-packages | ||
|
||
- name: functional tests for sdk | ||
run: | | ||
export SNET_TEST_WALLET_PRIVATE_KEY=${{ secrets.PRIV_KEY }} | ||
export SNET_TEST_INFURA_KEY=${{ secrets.INF_KEY }} | ||
export FORMER_SNET_TEST_INFURA_KEY=${{ secrets.FORM_INF_KEY }} | ||
export PIP_BREAK_SYSTEM_PACKAGES=1 | ||
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python | ||
sh -ex ./testcases/utils/run_all_functional.sh |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
./packages/sdk/testcases/utils/reset_environment.sh | ||
./testcases/utils/reset_environment.sh | ||
|
||
cd packages/sdk/testcases/functional_tests | ||
python test_sdk_client.py | ||
cd testcases/functional_tests | ||
python3 test_sdk_client.py | ||
|
||
python test_prepaid_payment.py | ||
#python3 test_prepaid_payment.py |