-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2 Add integration test #4
Changes from 17 commits
f640dc2
a9aaffa
7ec94d0
fa88f6f
3b57d1f
1242927
d0afc70
6463ecf
3cb6789
1afc9fc
3897bfb
5fd9a21
7ed8102
e0a4d37
510bf0a
7530874
5d196ce
ca8daf5
5d6d848
ea2d08f
7fba0a1
2b31e96
a3eb82f
61be7b6
cc4ebc0
5ac6db3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
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 platform-contracts | ||
command: | | ||
cd $SINGNET_REPOS | ||
git clone https://github.com/singnet/platform-contracts.git | ||
cd platform-contracts | ||
npm install | ||
npm install ganache-cli | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually commands above doesn't build platform-contracts they just clone repository and install dependencies. To build contracts you should run: |
||
- run: | ||
name: Build snet-cli | ||
command: | | ||
cd $SINGNET_REPOS | ||
git clone https://github.com/singnet/snet-cli.git | ||
cd snet-cli | ||
./scripts/blockchain install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we need to copy contracts from |
||
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 | ||
./scripts/install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing regarding contracts as for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I update the circleci config to build projects using downloaded parents. |
||
./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 | ||
godog |
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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is worth to add
token-contracts
as well.