This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
2,738 additions
and
3,506 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,14 @@ | ||
node_modules | ||
dapps | ||
logs/*.log | ||
nodejs | ||
npm-debug.log | ||
release | ||
ssl | ||
stacktrace* | ||
tmp | ||
public/node_modules | ||
public/bower_components | ||
public/static | ||
test/lisk-js | ||
helpers/bignum.js |
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,39 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 5, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"semi": "error", | ||
"no-eq-null": "off", | ||
"indent": ["error", "tab"], | ||
"eqeqeq": "off", | ||
"curly": "error", | ||
"no-undef": "error", | ||
"quotes": ["error", "single"], | ||
"space-before-function-paren": ["error", { | ||
"anonymous": "always", | ||
"named": "always", | ||
"asyncArrow": "ignore" | ||
}], | ||
"callback-return": "off", | ||
"global-require": "off", | ||
"handle-callback-err": "off", | ||
"no-mixed-requires": "off", | ||
"no-new-require": "off" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true | ||
}, | ||
"globals": { | ||
"it": true, | ||
"describe": true, | ||
"before": true, | ||
"beforeEach": true, | ||
"after": true, | ||
"afterEach": true | ||
}, | ||
"plugins": [] | ||
|
||
} |
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 |
---|---|---|
|
@@ -11,5 +11,6 @@ npm-debug.log | |
release | ||
ssl/ | ||
stacktrace* | ||
test/.coverage-unit | ||
tmp | ||
sftp-config.json |
This file was deleted.
Oops, something went wrong.
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,52 +1,59 @@ | ||
dist: 'trusty' | ||
language: node_js | ||
node_js: | ||
- '6.9.4' | ||
- '6.9.5' | ||
cache: | ||
yarn: true | ||
directories: | ||
- test/lisk-js | ||
- node_modules | ||
services: | ||
- postgresql | ||
addons: | ||
postgresql: '9.6' | ||
install: | ||
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | ||
- echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | ||
- sudo apt-get update && sudo apt-get install yarn | ||
- yarn | ||
- npm install | ||
before_script: | ||
- createdb lisk_test | ||
- psql -d lisk_test -c "alter user "$USER" with password 'password';" | ||
- wget https://downloads.lisk.io/lisk-node/lisk-node-Linux-x86_64.tar.gz | ||
- tar -zxvf lisk-node-Linux-x86_64.tar.gz | ||
- cd test/lisk-js/; yarn; cd ../.. | ||
- cd test/lisk-js/; npm install; cd ../.. | ||
- cp test/config.json test/genesisBlock.json . | ||
- node app.js &> .app.log & | ||
notifications: | ||
webhooks: https://coveralls.io/webhook?repo_token=l6rLvPBYHIwA92FQQmCUUTLI4zPuS4r5C | ||
env: | ||
global: | ||
- NODE_ENV=test | ||
- HOST=http://0.0.0.0:4000 | ||
- COVERALLS_PARALLEL=true | ||
matrix: | ||
- TEST=test/api/peer.transactions.stress.js | ||
- TEST=test/api/peer.transactions.votes.js | ||
- TEST=test/api/delegates.js | ||
- TEST=test/api/accounts.js | ||
- TEST=test/api/blocks.js | ||
- TEST=test/api/dapps.js | ||
- TEST=test/api/loader.js | ||
- TEST=test/api/multisignatures.js | ||
- TEST=test/api/peer.js | ||
- TEST=test/api/peer.dapp.js | ||
- TEST=test/api/peer.blocks.js | ||
- TEST=test/api/peer.signatures.js | ||
- TEST=test/api/peer.transactions.collision.js | ||
- TEST=test/api/peer.transactions.delegates.js | ||
- TEST=test/api/peer.transactions.main.js | ||
- TEST=test/api/peer.transactions.signatures.js | ||
- TEST=test/api/peers.js | ||
- TEST=test/api/signatures.js | ||
- TEST=test/api/transactions.js | ||
- TEST=test/api/peer.transactions.stress.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.transactions.votes.js TEST_TYPE='FUNC' | ||
- TEST=test/api/delegates.js TEST_TYPE='FUNC' | ||
- TEST=test/api/accounts.js TEST_TYPE='FUNC' | ||
- TEST=test/api/blocks.js TEST_TYPE='FUNC' | ||
- TEST=test/api/dapps.js TEST_TYPE='FUNC' | ||
- TEST=test/api/loader.js TEST_TYPE='FUNC' | ||
- TEST=test/api/multisignatures.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.dapp.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.blocks.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.signatures.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.transactions.collision.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.transactions.delegates.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.transactions.main.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peer.transactions.signatures.js TEST_TYPE='FUNC' | ||
- TEST=test/api/peers.js TEST_TYPE='FUNC' | ||
- TEST=test/api/signatures.js TEST_TYPE='FUNC' | ||
- TEST=test/api/transactions.js TEST_TYPE='FUNC' | ||
|
||
- TEST=test/unit/helpers | ||
- TEST=test/unit/logic | ||
- TEST=test/unit/helpers TEST_TYPE='UNIT' | ||
- TEST=test/unit/logic TEST_TYPE='UNIT' | ||
- TEST=test/unit/modules TEST_TYPE='UNIT' | ||
script: 'npm run travis' | ||
after_success: | ||
- bash .travis/after-success.sh $TRAVIS_BUILD_NUMBER ${TRAVIS_JOB_NUMBER#*.} $TEST_TYPE $TRAVIS_BUILD_DIR $TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_BRANCH; | ||
after_failure: | ||
- cat .app.log | ||
|
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
TRAVIS_BUILD_NUMBER=$1 | ||
JOB_NUMBER=$2 | ||
TEST_TYPE=$3 | ||
TRAVIS_BUILD_DIR=$4 | ||
TRAVIS_BRANCH=$5 | ||
TRAVIS_PULL_REQUEST_BRANCH=$6 | ||
|
||
if [ ${TEST_TYPE} == "FUNC" ]; then | ||
npm run fetchCoverage; | ||
fi | ||
bash .travis/send-report.sh \ | ||
${TRAVIS_BUILD_NUMBER} \ | ||
${JOB_NUMBER} \ | ||
${TEST_TYPE} \ | ||
${TRAVIS_BUILD_DIR} \ | ||
${TRAVIS_BRANCH} \ | ||
${TRAVIS_PULL_REQUEST_BRANCH}; |
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,48 @@ | ||
#!/bin/bash | ||
|
||
TRAVIS_BUILD_NUMBER=$1 | ||
JOB_NUMBER=$2 | ||
TEST_TYPE=$3 | ||
TRAVIS_BUILD_DIR=$4 | ||
TRAVIS_BRANCH=$5 | ||
TRAVIS_PULL_REQUEST_BRANCH=$6 | ||
|
||
if [ -z ${TRAVIS_BUILD_NUMBER+x} ] || [ -z ${JOB_NUMBER+x} ] || [ -z ${TEST_TYPE+x} ] || \ | ||
[ -z ${TRAVIS_BUILD_DIR+x} ] || [ -z ${TRAVIS_BRANCH+x} ] || [ -z ${TRAVIS_PULL_REQUEST_BRANCH+x} ]; then | ||
echo "Provide all script parameters." | ||
exit 1 | ||
fi | ||
|
||
COVERAGE_DIR=${TRAVIS_BUILD_DIR}/test | ||
|
||
if [ ${TEST_TYPE} == "FUNC" ]; then | ||
REPORT_NAME=".coverage-func"; | ||
unzip ${COVERAGE_DIR}/.coverage-func.zip -d ${COVERAGE_DIR}/${REPORT_NAME} | ||
else | ||
REPORT_NAME=".coverage-unit"; | ||
fi | ||
|
||
if [ ! -e ${COVERAGE_DIR}/${REPORT_NAME}/lcov.info ]; then | ||
echo "Cannot find the report at path $COVERAGE_DIR/$REPORT_NAME"; | ||
exit 1 | ||
fi | ||
|
||
if [ -n ${TRAVIS_PULL_REQUEST_BRANCH+x} ] && [ -n ${TRAVIS_PULL_REQUEST_BRANCH} ]; then | ||
BRANCH=${TRAVIS_PULL_REQUEST_BRANCH} | ||
else | ||
BRANCH=${TRAVIS_BRANCH} | ||
fi | ||
|
||
COVERALLS_SERVICE_NAME="travis-ci" | ||
COVERALLS_REPO_TOKEN=7s05KDqmPWkwZ6nzU5WtznKkt5FKDE3kv | ||
COVERALLS_PARALLEL=true | ||
COVERALLS_SERVICE_JOB_ID=JOB_NUMBER | ||
|
||
yarn global add coveralls | ||
cat ${COVERAGE_DIR}/${REPORT_NAME}/lcov.info | coveralls | ||
|
||
if [ -z $? ] || [ $? -eq 1 ]; then | ||
echo ${COVERAGE_DIR}/${REPORT_NAME}/lcov.info "SEND TO COVERALLS" | ||
else | ||
echo "Unable to create reports: " $? | ||
fi |
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
Oops, something went wrong.