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
48 changed files
with
1,666 additions
and
277 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 |
---|---|---|
|
@@ -12,3 +12,4 @@ release | |
ssl/ | ||
stacktrace* | ||
tmp | ||
sftp-config.json |
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,52 @@ | ||
dist: 'trusty' | ||
language: node_js | ||
node_js: | ||
- '6.9.4' | ||
cache: | ||
yarn: true | ||
directories: | ||
- test/lisk-js | ||
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 | ||
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 ../.. | ||
- cp test/config.json test/genesisBlock.json . | ||
- node app.js &> .app.log & | ||
env: | ||
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/unit/helpers | ||
- TEST=test/unit/logic | ||
script: 'npm run travis' | ||
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
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
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
/** | ||
* Helper module for parsing git commit information | ||
* | ||
* @class git.js | ||
*/ | ||
|
||
var childProcess = require('child_process'); | ||
|
||
/** | ||
* Return hash of last git commit if available | ||
* | ||
* @method getLastCommit | ||
* @public | ||
* @return {String} Hash of last git commit | ||
* @throws {Error} Throws error if cannot get last git commit | ||
*/ | ||
function getLastCommit () { | ||
var spawn = childProcess.spawnSync('git', ['rev-parse', 'HEAD']); | ||
var err = spawn.stderr.toString().trim(); | ||
|
||
if (err) { | ||
throw new Error(err); | ||
} else { | ||
return spawn.stdout.toString().trim(); | ||
} | ||
} | ||
|
||
module.exports = { | ||
getLastCommit: getLastCommit | ||
}; |
Oops, something went wrong.