File tree Expand file tree Collapse file tree 3 files changed +18
-5
lines changed
Expand file tree Collapse file tree 3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,7 @@ name = "javascript"
77 environment = [
88 " nodejs" ,
99 " mocha"
10- ]
10+ ]
11+
12+ [[analyzers ]]
13+ name = " test-coverage"
Original file line number Diff line number Diff line change @@ -21,12 +21,22 @@ jobs:
2121 steps :
2222 - name : Install dependancies
2323 run : sudo apt-get update && sudo apt-get install libavahi-compat-libdnssd-dev python3-guessit
24- - uses : actions/checkout@v2
24+ - uses : actions/checkout@v3
25+ with :
26+ ref : ${{ github.event.pull_request.head.sha }}
2527 - name : Checkout submodules
2628 run : git submodule update --init --recursive
2729 - name : Use Node.js ${{ matrix.node-version }}
28- uses : actions/setup-node@v1
30+ uses : actions/setup-node@v3
2931 with :
3032 node-version : ${{ matrix.node-version }}
3133 - run : npm ci
32- - run : npm test
34+ - run : npm run test:coverage
35+ - name : Report coverage to DeepSource
36+ if : matrix.node-version == '25.x'
37+ run : |
38+ curl -sL https://github.com/deepsource/cli/releases/latest/download/ds -o ds
39+ chmod +x ds
40+ ./ds report --analyzer test-coverage --key javascript --value-file ./coverage/lcov.info
41+ env :
42+ DEEPSOURCE_DSN : ${{ secrets.DEEPSOURCE_DSN }}
Original file line number Diff line number Diff line change 2727 "oblecto:dev" : " tsx src/bin/oblecto.ts" ,
2828 "debug" : " node --inspect=0.0.0.0 --loader tsx src/index.ts" ,
2929 "test:mocha" : " mocha --extension ts --require tsx tests/mocha" ,
30- "test:coverage" : " c8 npm run test:mocha" ,
30+ "test:coverage" : " c8 --reporter=lcov --reporter=text npm run test:mocha" ,
3131 "test:startup" : " scripts/test.sh" ,
3232 "test" : " npm run test:mocha" ,
3333 "lint" : " eslint ." ,
You can’t perform that action at this time.
0 commit comments