Skip to content

Commit 34e54aa

Browse files
authored
Merge pull request #77 from rapid7/feature/travis-ci-build
👷 Configure a Travis CI build
2 parents 3007db9 + b566c8a commit 34e54aa

File tree

5 files changed

+25
-0
lines changed

5 files changed

+25
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ test/.aws/
55
.DS_Store
66
test/data/test.json
77
typings/
8+
coverage/

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: node_js
2+
env:
3+
- CXX=g++-4.8
4+
sudo: false
5+
script:
6+
- npm test
7+
- npm run lint
8+
- npm run cover
9+
after_success:
10+
npm run report
11+
addons:
12+
apt:
13+
sources:
14+
- ubuntu-toolchain-r-test
15+
packages:
16+
- g++-4.8

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Awsaml
2+
[![Build Status](https://api.travis-ci.org/rapid7/awsaml.svg?branch=master)](https://travis-ci.org/rapid7/awsaml) [![Coverage Status](https://coveralls.io/repos/github/rapid7/awsaml/badge.svg?branch=master)](https://coveralls.io/github/rapid7/awsaml?branch=master)
3+
24
Awsaml is an application for providing automatically rotated temporary [AWS][]
35
credentials. Credentials are stored in `~/.aws/credentials` so they can be used
46
with AWS SDKs. Credentials are valid for one hour and are rotated every hour

lib/storage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Storage {
2424
return;
2525
}
2626
var json = fs.readFileSync(this.file, 'utf8');
27+
2728
if (json === '') {
2829
this.data = {};
2930
return;

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"postbuild": "export platform=darwin; npm run zip & export platform=linux; npm run zip & export platform=win32; npm run zip",
2121
"zip": "cd dist/Awsaml-${platform}-x64 && zip -q -FS -r ../awsaml-v${npm_package_version}-${platform}-x64.zip .",
2222
"test": "mocha",
23+
"cover": "rm -Rf coverage/* && istanbul cover _mocha -- -R spec",
2324
"lint": "eslint *.js views/** lib/** test/**",
25+
"report": "coveralls < ./coverage/lcov.info",
2426
"watch": "webpack-dev-server",
2527
"pack": "webpack --progress --colors --config=webpack.config.pack.js",
2628
"show-appcast-checkpoint": "curl --compressed --location --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36' 'https://github.com/rapid7/awsaml/releases.atom' | /usr/bin/sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256"
@@ -53,6 +55,7 @@
5355
"babel-eslint": "^6.0.4",
5456
"babel-loader": "^6.2.4",
5557
"babel-runtime": "^6.9.0",
58+
"coveralls": "^2.11.9",
5659
"css-loader": "^0.23.1",
5760
"electron-rebuild": "^1.1.4",
5861
"enzyme": "^2.3.0",
@@ -63,7 +66,9 @@
6366
"eslint-plugin-import": "^1.8.0",
6467
"eslint-plugin-jsx-a11y": "^1.2.2",
6568
"eslint-plugin-react": "^5.1.1",
69+
"istanbul": "^0.4.3",
6670
"mocha": "^2.5.3",
71+
"mocha-lcov-reporter": "^1.2.0",
6772
"react-hot-loader": "^1.3.0",
6873
"should": "^8.4.0",
6974
"style-loader": "^0.13.1",

0 commit comments

Comments
 (0)