Skip to content

Commit d872acf

Browse files
committed
- config circle ci
1 parent b8185af commit d872acf

File tree

5 files changed

+43
-3
lines changed

5 files changed

+43
-3
lines changed

.circleci/config.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/mern-starter
5+
docker:
6+
- image: circleci/node:4.8.2
7+
- image: mongo:3.4.4
8+
steps:
9+
- checkout
10+
- run:
11+
name: update-npm
12+
command: 'sudo npm install -g npm@5'
13+
- restore_cache:
14+
key: dependency-cache-{{ checksum "package.json" }}
15+
- run:
16+
name: install-npm-wee
17+
command: npm install
18+
- save_cache:
19+
key: dependency-cache-{{ checksum "package.json" }}
20+
paths:
21+
- ./node_modules
22+
- run:
23+
name: test
24+
command: npm test
25+
- run:
26+
name: code-coverage
27+
command: './node_modules/.bin/nyc report --reporter=text-lcov'
28+
- store_artifacts:
29+
path: test-results.xml
30+
prefix: tests
31+
- store_artifacts:
32+
path: coverage
33+
prefix: coverage
34+
- store_test_results:
35+
path: test-results.xml

.circleci/run.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
call token.bat
2+
curl --user %CIRCLE_TOKEN%: --request POST --form config=@config.yml --form notify=false "https://circleci.com/api/v1.1/project/github/zeroboo/nodejs-random-selector/tree/master"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,6 @@ typings/
7676
.fusebox/
7777

7878
#DynamoDB Local files
79-
.dynamodb/
79+
.dynamodb/
80+
81+
.circleci/token.bat

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "random-selector",
3-
"version": "1.0.2",
3+
"version": "1.0.6",
44
"description": "Randomly select elements in a collection.",
5-
"main": "src/randomSelector.js",
5+
"main": "src/index.js",
66
"scripts": {
77
"test": "mocha --reporter spec",
88
"start": "node src/demo.js"

test/testFrequencyRandomSelector.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
'use strict';
12
var selectorFactory = require('../src/index');
23
const assert = require('chai').assert;
34
const expect = require('chai').expect;

0 commit comments

Comments
 (0)