Skip to content
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

Fix travis 2 #1

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
884bf6d
change logic
SatyamSB Aug 13, 2018
454d850
minor fixes
SatyamSB Aug 13, 2018
fa9b42e
change repo
SatyamSB Aug 13, 2018
9a3e049
realign the folder structure
SatyamSB Aug 13, 2018
db6c04a
minor fixes
SatyamSB Aug 13, 2018
5d7a1f9
package added
SatyamSB Aug 13, 2018
29eebdf
install module in developer directory
SatyamSB Aug 13, 2018
231ae6f
fix routing error
SatyamSB Aug 13, 2018
3fce342
add solc
SatyamSB Aug 13, 2018
73552cb
provide permission
SatyamSB Aug 13, 2018
22f6ac6
change in the installation command
SatyamSB Aug 14, 2018
87fa4c0
fix1
SatyamSB Aug 14, 2018
23dad34
add echos
SatyamSB Aug 14, 2018
33808b7
fix2
SatyamSB Aug 14, 2018
099253d
change
SatyamSB Aug 14, 2018
2625afe
fix3
SatyamSB Aug 14, 2018
86dbde5
fix4
SatyamSB Aug 14, 2018
96f5ec7
fix 4
SatyamSB Aug 14, 2018
56b4b3a
fix 5
SatyamSB Aug 14, 2018
ac8f9ec
fix 6
SatyamSB Aug 14, 2018
87716fb
fix 7
SatyamSB Aug 14, 2018
ce72ede
fix 8
SatyamSB Aug 14, 2018
866abba
fix 9
SatyamSB Aug 14, 2018
7e1342e
fix 10
SatyamSB Aug 14, 2018
534740b
fix 11
SatyamSB Aug 14, 2018
bce5afe
fix 12
SatyamSB Aug 14, 2018
8a72e1e
fix 13
SatyamSB Aug 14, 2018
62c0672
fix 14
SatyamSB Aug 14, 2018
e580e06
fix 15
SatyamSB Aug 14, 2018
015664d
fix 16
SatyamSB Aug 14, 2018
f7a9bb1
fix 17
SatyamSB Aug 14, 2018
b48969b
fix 18
SatyamSB Aug 14, 2018
274de1e
try
SatyamSB Aug 14, 2018
909f40c
trying
SatyamSB Aug 14, 2018
51b4f83
again trying
SatyamSB Aug 14, 2018
17619ba
again again trying
SatyamSB Aug 14, 2018
52ccc08
ise baar tho chalega
SatyamSB Aug 14, 2018
9dc7d57
ise baar tho thok bajake chalna hai
SatyamSB Aug 14, 2018
a6e215e
boundary checks implemented
SatyamSB Aug 14, 2018
4dee561
coverage get true
SatyamSB Aug 14, 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
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@ cache:
directories:
- node_modules
env:
- SOLIDITY_COVERAGE=false
- SOLIDITY_COVERAGE=true
matrix:
fast_finish: true
allow_failures:
- env: SOLIDITY_COVERAGE=true
before_install:
- echo -ne '\n' | sudo add-apt-repository ppa:ethereum/ethereum
- sudo apt-get -y update
- sudo apt-get -y install solc
before_script:
- truffle version
script:
- npm run test
- npm run docs
notifications:
slack:
secure: W4FZSabLrzF74f317hutolEHnlq2GBlQxU6b85L5XymrjgLEhlgE16c5Qz7Emoyt6le6PXL+sfG2ujJc3XYys/6hppgrHSAasuJnKCdQNpmMZ9BNyMs6WGkmB3enIf3K/FLXb26AQdwpQdIXuOeJUTf879u+YoiZV0eZH8d3+fsIOyovq9N6X5pKOpDM9iT8gGB4t7fie7xf51s+iUaHxyO9G7jDginZ4rBXHcU7mxCub9z+Z1H8+kCTnPWaF+KKVEXx4Z0nI3+urboD7E4OIP02LwrThQls2CppA3X0EoesTcdvj/HLErY/JvsXIFiFEEHZzB1Wi+k2TiOeLcYwEuHIVij+HPxxlJNX/j8uy01Uk8s4rd+0EhvfdKHJqUKqxH4YN2npcKfHEss7bU3y7dUinXQfYShW5ZewHdvc7pnnxBTfhvmdi64HdNrXAPq+s1rhciH7MmnU+tsm4lhrpr+FBuHzUMA9fOCr7b0SQytZEgWpiUls88gdbh3yG8TjyZxmZJGx09cwEP0q7VoH0UwFh7mIu5XmYdd5tWUhavTiO7YV8cUPn7MvwMsTltB3YBpF/fB26L7ka8zBhCsjm9prW6SVYU/dyO3m91VeZtO/zJFHRDA6Q58JGVW2rgzO39z193qC1EGRXqTie96VwAAtNg8+hRb+bI/CWDVzSPc=
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"scripts": {
"test": "scripts/test.sh",
"docs": "scripts/docs.sh",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"lint:sol": "solium -d .",
Expand Down Expand Up @@ -60,6 +61,7 @@
"readline-sync": "^1.4.9",
"shelljs": "^0.8.2",
"solc": "^0.4.24",
"solidity-docgen": "^0.1.0",
"truffle-contract": "^3.0.4",
"truffle-hdwallet-provider-privkey": "^0.1.0",
"web3": "^1.0.0-beta.33"
Expand Down
6 changes: 6 additions & 0 deletions scripts/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/usr/bin/env bash

SOLIDITY_COVERAGE=true scripts/test.sh
pid=$! # Get PID of background command
while kill -0 $pid # Signal 0 just tests whether the process exists
do
echo -n "waiting...."
sleep 180;
done
35 changes: 22 additions & 13 deletions scripts/docs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -o errexit

# Global variables
DIRECTORY=polymath-core-docs
DIRECTORY=polymath-developer-portal
WEBSITE_DIRECTORY=versioned_docs
CORE_ROUTE=$PWD

Expand All @@ -14,6 +14,12 @@ create_docs() {
# getting the all available branches
if [ "$(git branch | grep -w $latestTag)" == "" ];
then
# Check whether the branch is already present or not
if [ "$(git branch -r | grep "origin/$latestTag" | wc -l)" -eq 1 ];
then
echo "$latesTag Branch is already present on remote"
exit 0
fi
# Checkout and create the $latestTag branch
git checkout -b $latestTag

Expand All @@ -30,28 +36,31 @@ create_docs() {

echo "Generating the API documentation in branch $latestTag"
# Command to generate the documentation using the solidity-docgen
#npm install > /dev/null 2>&1
migrate=$(SOLC_ARGS="openzeppelin-solidity="$CORE_ROUTE"/node_modules/openzeppelin-solidity" \
solidity-docgen $CORE_ROUTE $CORE_ROUTE/contracts $HOME/tmp/polymath-core-docs/docs)
solidity-docgen $CORE_ROUTE $CORE_ROUTE/contracts $CORE_ROUTE/polymath-developer-portal/)
echo "Successfully docs are generated..."
echo "Transferring the API DOCS to $latestTag directory"
mv ../../docs/api_* $latestTag

# Commit the changes
echo "Commiting the new changes..."
git add .
git commit -m "create new api docs for $latestTag" > /dev/null 2>&1
git push origin $latestTag > /dev/null 2>&1
#git commit -m "create new api docs for $latestTag" > /dev/null 2>&1
#git push origin $latestTag > /dev/null 2>&1
git commit -m "create new api docs for $latestTag"
git push origin $latestTag

# Remove the repository
echo "Removing the repository from the system...."
cd ../../../../
rm -rf polymath-core-docs
exit 1
cd ../../../
rm -rf polymath-developer-portal
exit 0
}

reject_docs() {
echo "$latestTag docs are already exist into the $DIRECTORY"
exit 1
exit 0
}

echo "Checking the latest tag branch merge on masters"
Expand All @@ -66,18 +75,18 @@ versionNo=$(echo "$latestTag" | cut -b 2-6)
#print the tag
echo "Latest tag is: $latestTag"

# clone the polymath-core-docs
cd ~/tmp
# clone the polymath-developer-portal

if [ ! -d $DIRECTORY ]; then
git clone https://github.com/PolymathNetwork/polymath-core-docs.git > /dev/null 2>&1
git clone https://${GH_USR}:${GH_PWD}@github.com/PolymathNetwork/polymath-developer-portal.git > /dev/null 2>&1
cd $DIRECTORY
else
cd $DIRECTORY
git pull > /dev/null 2>&1
git checkout master > /dev/null 2>&1
git pull origin master > /dev/null 2>&1
fi

cd docs/website
cd website

if [ ! -d $WEBSITE_DIRECTORY ]; then
echo "Created: versioned_docs directory"
Expand Down
9 changes: 9 additions & 0 deletions scripts/wait.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

tail -f /dev/null >/tmp/apt-get.log & # Run in background, with output redirected
pid=$! # Get PID of background command
while kill -0 $pid # Signal 0 just tests whether the process exists
do
echo -n "executing"
sleep 5;
done
Loading