File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
2- "reporter" : [" text" , " html" ]
2+ "reporter" : [" text" , " html" , " lcov" ],
3+ "reports-dir" : " ./coverage"
34}
Original file line number Diff line number Diff line change 1+ name : HDS Lib JS CI
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - ' *'
7+ push :
8+ branches :
9+ - ' main'
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-22.04
14+
15+ strategy :
16+ matrix :
17+ node-version : [20.x, 22.x]
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+
23+ - name : Install Node.js ${{ matrix.node-version }}
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : ${{ matrix.node-version }}
27+
28+ - name : Install dependencies
29+ run : npm install
30+
31+ - name : Build
32+ run : npm run build
33+
34+ - name : Lint
35+ run : npm run lint
36+
37+ - name : Run tests with coverage
38+ run : npm run test:coverage:ci
39+
40+ - name : Upload coverage to Codecov
41+ if : matrix.node-version == '22.x'
42+ uses : codecov/codecov-action@v4
43+ with :
44+ token : ${{ secrets.CODECOV_TOKEN }}
45+ slug : healthdatasafe/hds-lib-js
46+ files : ./coverage/lcov.info
47+ fail_ci_if_error : false
Original file line number Diff line number Diff line change 11# HDS JAVASCRIPT LIBRARY
22
3+ [ ![ CI] ( https://github.com/healthdatasafe/hds-lib-js/actions/workflows/ci.yml/badge.svg )] ( https://github.com/healthdatasafe/hds-lib-js/actions/workflows/ci.yml )
4+ [ ![ codecov] ( https://codecov.io/gh/healthdatasafe/hds-lib-js/graph/badge.svg )] ( https://codecov.io/gh/healthdatasafe/hds-lib-js )
5+
36Generic toolkit for server and web applications.
47
581 . Manages global settings for the lib (servers, localization, logger)
Original file line number Diff line number Diff line change 55 "scripts" : {
66 "test" : " NODE_ENV=test mocha tests --test-reporter=spec" ,
77 "test:coverage" : " NODE_ENV=test c8 mocha tests --test-reporter=spec" ,
8+ "test:coverage:ci" : " NODE_ENV=test c8 mocha tests --test-reporter=spec --timeout=20000" ,
89 "build" : " npm run build:ts; npm run build:webpack" ,
910 "build:ts" : " tsc" ,
1011 "build:webpack" : " webpack" ,
3233 "homepage" : " https://github.com/healthdatasafe/hds-lib-js#readme" ,
3334 "devDependencies" : {
3435 "assert" : " ^2.1.0" ,
36+ "c8" : " ^10.1.3" ,
3537 "copy-webpack-plugin" : " ^13.0.0" ,
3638 "eslint" : " ^9.18.0" ,
3739 "globals" : " ^15.14.0" ,
4648 "dependencies" : {
4749 "@pryv/monitor" : " 3.0.1" ,
4850 "@pryv/socket.io" : " 3.0.1" ,
49- "c8" : " ^10.1.3" ,
5051 "events" : " ^3.3.0" ,
5152 "pryv" : " 3.0.1" ,
5253 "short-unique-id" : " ^5.3.2"
You can’t perform that action at this time.
0 commit comments