Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
50f9351
added vulnerable-package
nickmerwin Aug 27, 2020
5640565
travis point to ngrok, updated run defs
nickmerwin Aug 27, 2020
537fd7c
test
nickmerwin Aug 27, 2020
0f91a60
Update package.json
nickmerwin Aug 27, 2020
e89690f
Update package.json
nickmerwin Aug 27, 2020
918da0d
runner update
nickmerwin Aug 27, 2020
5c7a1b7
Update package.json
nickmerwin Aug 27, 2020
9874645
Update package.json
nickmerwin Aug 27, 2020
5116b53
lcov config
nickmerwin Aug 27, 2020
80d531f
w/o --exclude-node-modules=false
nickmerwin Aug 27, 2020
2d2db1c
Update package.json
nickmerwin Aug 27, 2020
38c166d
--exclude-node-modules=false
nickmerwin Aug 27, 2020
9b0dcfa
2>/dev/null
nickmerwin Aug 27, 2020
01a69e0
Update package.json
nickmerwin Aug 27, 2020
68894f8
Update package.json
nickmerwin Aug 27, 2020
5fe0e20
Update package.json
nickmerwin Aug 27, 2020
a8cf787
Update package.json
nickmerwin Aug 27, 2020
01cb64c
runner
nickmerwin Aug 27, 2020
3a82f8f
travis normal run
nickmerwin Aug 27, 2020
b791e2b
CI updates
nickmerwin Aug 27, 2020
e62343f
CI updates
nickmerwin Aug 27, 2020
86e733a
Update workflow.yml
nickmerwin Aug 27, 2020
565d7f8
Update workflow.yml
nickmerwin Aug 27, 2020
cda9265
Update package.json
nickmerwin Aug 27, 2020
443b7ef
GHA only
nickmerwin Aug 27, 2020
b1c86f6
Update workflow.yml
nickmerwin Aug 27, 2020
6de4bb8
Update workflow.yml
nickmerwin Aug 27, 2020
f560422
Update workflow.yml
nickmerwin Aug 27, 2020
fdbd3a2
Update .travis.yml
nickmerwin Aug 27, 2020
bc35918
Update .travis.yml
nickmerwin Aug 27, 2020
e38af3d
Update workflow.yml
nickmerwin Aug 27, 2020
2b19a93
Update run.js
nickmerwin Aug 30, 2020
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
117 changes: 61 additions & 56 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,61 @@
version: 2.1

orbs:
coveralls: coveralls/coveralls@1.0.5
node: circleci/node@1.1.6

jobs:
build-1:
executor:
name: node/default

steps:
- checkout

- node/with-cache:
steps:
- run: npm install
- run: make test-coverage-1

- coveralls/upload:
parallel: true
flag_name: Test 1
verbose: true

build-2:
executor:
name: node/default

steps:
- checkout

- node/with-cache:
steps:
- run: npm install
- run: make test-coverage-2

- coveralls/upload:
parallel: true
flag_name: Test 2
verbose: true

done:
executor:
name: node/default

steps:
- coveralls/upload:
parallel_finished: true

workflows:
test_parallel_then_upload:
jobs:
- build-1
- build-2
- done:
requires: [build-1, build-2]
#version: 2.1
#
#orbs:
# coveralls: coveralls/coveralls@1.0.5
# node: circleci/node@1.1.6
#
#jobs:
# build-1:
# executor:
# name: node/default
#
# steps:
# - checkout
#
# - node/with-cache:
# steps:
# - run: npm install
# - run: npm run coverage-1
#
# - coveralls/upload:
# parallel: true
# flag_name: Test 1
# verbose: true
#
# build-2:
# executor:
# name: node/default
#
# steps:
# - checkout
#
# - node/with-cache:
# steps:
# - run: npm install
# - run: npm run coverage-2
#
# - coveralls/upload:
# parallel: true
# flag_name: Test 2
# verbose: true
#
# done:
# executor:
# name: node/default
#
# steps:
# - run:
# name: coveralls/upload
# command: coveralls/upload
# parallel_finished: true
# environmnent:
# - COVERALLS_ENDPOINT: https://coveralls-nick.ngrok.io
# - COVERALLS_REPO_TOKEN: Aff25AMpEmGTWwx9s0mjuakIe5AINw6H9
#
#workflows:
# test_parallel_then_upload:
# jobs:
# - build-1
# - build-2
# - done:
# requires: [build-1, build-2]
9 changes: 8 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,22 @@ jobs:
- 2
steps:
- uses: actions/checkout@master
- name: environment
run: |
echo "export " > ~/.bashrc
echo "export " > ~/.bashrc
- uses: actions/setup-node@master
with:
version: 10.x
- run: npm install
- run: make test-coverage-${{ matrix.test_number }}
# - run: COVERALLS_ENDPOINT=https://coveralls-nick.ngrok.io COVERALLS_REPO_TOKEN=Aff25AMpEmGTWwx9s0mjuakIe5AINw6H9 make test-coveralls-${{ matrix.test_number }}
- run: make test-coveralls-${{ matrix.test_number }}
- name: Coveralls
uses: coverallsapp/github-action@v1.1.0
env:
NODE_COVERALLS_DEBUG: 1
# COVERALLS_REPO_TOKEN: Aff25AMpEmGTWwx9s0mjuakIe5AINw6H9
# COVERALLS_ENDPOINT: https://coveralls-nick.ngrok.io
with:
github-token: ${{ secrets.github_token }}
parallel: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ lib-cov/
coverage.json
npm-debug.log
.idea
.nyc_output
.DS_Store
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ node_js:
- "node"
env:
global:
- COVERALLS_PARALLEL=true
- COVERALLS_ENDPOINT=https://coveralls-nick.ngrok.io
- COVERALLS_REPO_TOKEN=Aff25AMpEmGTWwx9s0mjuakIe5AINw6H9
jobs:
include:
- script: COVERALLS_FLAG_NAME=test-1 make test-coveralls-1
- script: COVERALLS_FLAG_NAME=test-2 make test-coveralls-2
notifications:
webhooks: https://coveralls.io/webhook
- script: make test-coveralls
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ test:
@$(MAKE) lint
@NODE_ENV=test ./node_modules/.bin/mocha -b --reporter $(REPORTER)

test-1:
@NODE_ENV=test ./node_modules/.bin/mocha -b --report $(REPORTER) test/run1.js

test-2:
@NODE_ENV=test ./node_modules/.bin/mocha -b --report $(REPORTER) test/run2.js

lint:
./node_modules/.bin/jshint ./lib ./test ./index.js

Expand Down
5 changes: 5 additions & 0 deletions lib/run.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
var vp = require('vulnerable-package');

var run = {
a: function(){
vp.safeFunction();
// more changes
return 1;
},
Expand All @@ -23,11 +26,13 @@ var run = {
},

d: function(){
// vp.vulnerableFunction();
var one = 1;
return 1;
},

e: function(){
// vp.unusedVulnerableFunction();
return 'blah';
},

Expand Down
Loading