Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f640dc2
Add initial circleci config file
stellarspot Sep 12, 2018
a9aaffa
Use ubuntu:latest image and build snet-cli, snet-daemon, and example-…
stellarspot Sep 12, 2018
7ec94d0
Add initial godog test which runs Ethereum network
stellarspot Sep 13, 2018
fa88f6f
Run integration test in circleci
stellarspot Sep 13, 2018
3b57d1f
Add Deploy contracts using Truffle integration test
stellarspot Sep 13, 2018
1242927
Use the current platform-pipeline branch in circleci for integration …
stellarspot Sep 13, 2018
d0afc70
Add IPFS is running integration test
stellarspot Sep 13, 2018
6463ecf
Check IPFS API and Gateway ports in integration test
stellarspot Sep 14, 2018
3cb6789
Add snet integration test
stellarspot Sep 14, 2018
1afc9fc
Copy arhives to download folder
stellarspot Sep 14, 2018
3897bfb
Add Organization is added integration test
stellarspot Sep 14, 2018
5fd9a21
Add publish example-service integration test
stellarspot Sep 14, 2018
7ed8102
Add example-service is run with snet-daemon integration test
stellarspot Sep 17, 2018
e0a4d37
Add SingularityNET job is created integration test
stellarspot Sep 17, 2018
510bf0a
Use to_string instead of strconv.Itoa(...)
stellarspot Sep 17, 2018
7530874
Fix small typo
stellarspot Sep 17, 2018
5d196ce
Add new line athe end of .circleci.config.yml file
stellarspot Sep 17, 2018
ca8daf5
Rename variable and function names to use Go Camel like style
stellarspot Sep 20, 2018
5d6d848
Use token-contracts and platform-contracts for building from local dirs
stellarspot Sep 20, 2018
ea2d08f
Fix typo during token-contracts cloning
stellarspot Sep 20, 2018
7fba0a1
Fix typo during snet-daemon building
stellarspot Sep 20, 2018
2b31e96
Timeout is added as the function parameters to the checkWithTimeout m…
stellarspot Sep 20, 2018
a3eb82f
Set default path for service_spec for service.json generation in exam…
stellarspot Sep 21, 2018
61be7b6
Use os.Link function to link path in integration tests
stellarspot Sep 21, 2018
cc4ebc0
Use default value for service_spec in the 'snet service init' command
stellarspot Sep 24, 2018
5ac6db3
Use symlink to link snet-daemon executable file
stellarspot Sep 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
version: 2
jobs:
build:
docker:
- image: ubuntu:latest
working_directory: /root/singnet/src/github.com/singnet/platform-pipeline
environment:
GOPATH: /root/singnet
SINGNET_REPOS: /root/singnet/src/github.com/singnet
steps:
- run:
name: Install tools
command: |
export PATH=$PATH:$GOPATH/bin
mkdir $GOPATH/download
cd $GOPATH/download
apt-get update
apt-get -y install sudo wget git
# Install NodeJS toolset
sudo apt-get -y install nodejs npm
# install Go tools
sudo apt-get -y install golang go-dep golang-goprotobuf-dev golint
# install IPFS
wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz
tar xvfz go-ipfs_*.tar.gz
cp ./go-ipfs/ipfs /usr/local/bin
# Installl Python
sudo apt-get -y install python3 python3-pip
# Install other
sudo apt-get -y install libudev-dev libusb-1.0-0-dev
- run:
name: Build token-contracts
command: |
cd $SINGNET_REPOS
git clone https://github.com/singnet/token-contracts.git
cd token-contracts
npm install
npm run-script compile
npm run-script package-npm
- run:
name: Build platform-contracts
command: |
cd $SINGNET_REPOS
git clone https://github.com/singnet/platform-contracts.git
cd platform-contracts
npm install ganache-cli
# install token-contracts from local dir
npm install $SINGNET_REPOS/token-contracts/build/npm-module
npm install
npm run-script compile
npm run-script package-npm
- run:
name: Build snet-cli
command: |
cd $SINGNET_REPOS
git clone https://github.com/singnet/snet-cli.git
cd snet-cli
# install token-contracts and platform-contracts from local dir
cd blockchain/
npm install $SINGNET_REPOS/token-contracts/build/npm-module
npm install $SINGNET_REPOS/platform-contracts/build/npm-module
cd ..
./scripts/blockchain install
pip3 install -e .
- run:
name: Build snet-daemon
command: |
export PATH=$PATH:$GOPATH/bin
cd $SINGNET_REPOS
git clone https://github.com/singnet/snet-daemon.git
cd snet-daemon
# install token-contracts and platform-contracts from local dir
cd resources/blockchain
npm install $SINGNET_REPOS/token-contracts/build/npm-module
npm install $SINGNET_REPOS/platform-contracts/build/npm-module
cd ../..
./scripts/install
./scripts/build linux amd64
- run:
name: Build example-service
command: |
export PATH=$PATH:$GOPATH/bin
cd $SINGNET_REPOS
git clone https://github.com/singnet/example-service.git
cd example-service
pip3 install -r requirements.txt
- checkout
- run:
name: Run integration tests
command: |
export PATH=$PATH:$GOPATH/bin
mkdir $GOPATH/log
go get github.com/DATA-DOG/godog/cmd/godog
# Disable TensorFlow warnings wich pollute example-service log file
export TF_CPP_MIN_LOG_LEVEL=2
godog
24 changes: 24 additions & 0 deletions features/publish_example_service.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Feature: Publish example service

Scenario: Run all services and publish example service
Given Ethereum network is running on port 8545
Given Contracts are deployed using Truffle
Given IPFS is running with API port 5002 and Gateway port 8081
Given Identity is created with user "snet-user" and private key "0xc71478a6d0fe44e763649de0a0deb5a080b788eefbbcf9c6f7aef0dd5dbd67e0"
Given snet is configured with Ethereum RPC endpoint 8545
Given snet is configured with IPFS endpoint 5002
When Organization is added:
| organization | address | member |
| ExampleOrganization | 0x4e74fefa82e83e0964f0d9f53c68e03f7298a8b2 | 0x3b2b3c2e2e7c93db335e69d827f3cc4bc2a2a2cb |
When example-service is registered
| name | price | endpoint | tags | description |
| ExampleOrganization | 1 | http://localhost:8080 | example service | Example service |
When example-service is published to network
| agent factory address | registry address |
| 0x5c7a4290f6f8ff64c69eeffdfafc8644a4ec3a4e | 0x4e74fefa82e83e0964f0d9f53c68e03f7298a8b2 |
When example-service is run with snet-daemon
| daemon port | ethereum endpoint port | passthrough endpoint port | agent contract address | private key |
| 8080 | 8545 | 5001 | 0xD39321C654351b412F4D13B45E7020FE9f99f608 | ba398df3130586b0d5e6ef3f757bf7fe8a1299d4b7268fdaae415952ed30ba87 |
Then SingularityNET job is created
| max price | agent contract address |
| 100000000 | 0xD39321C654351b412F4D13B45E7020FE9f99f608 |
Loading