File tree Expand file tree Collapse file tree 5 files changed +41
-6
lines changed
Expand file tree Collapse file tree 5 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 1+ name : Test and Lint
2+
3+ on :
4+ push :
5+ branches : [ 'main' ]
6+ pull_request :
7+ branches : ['*']
8+
9+ jobs :
10+ build :
11+
12+ runs-on : ubuntu-latest
13+
14+ strategy :
15+ matrix :
16+ node-version : [16.x]
17+
18+ steps :
19+ - uses : actions/checkout@v3
20+ - name : Use Node.js ${{ matrix.node-version }}
21+ uses : actions/setup-node@v3
22+ with :
23+ node-version : ${{ matrix.node-version }}
24+ - name : Install dependencies
25+ run : yarn install
26+ - name : Run Lint
27+ run : yarn lint
28+ - name : Run test
29+ run : yarn coverage:ci
Original file line number Diff line number Diff line change @@ -19,5 +19,6 @@ website
1919renovate.json
2020.prettierignore
2121.prettierrc
22+ .github /** /*
2223publish.sh
2324jest.config.js
Original file line number Diff line number Diff line change 1- jest . config . jsrequire ( 'ts-node/register' ) ;
2-
31module . exports = {
4- ' moduleFileExtensions' : [
2+ moduleFileExtensions : [
53 'js' ,
64 'json' ,
75 'ts' ,
86 ] ,
9- 'rootDir' : 'lib' ,
10- 'testRegex' : '/lib/.*\\.spec\\.(ts|js)$' ,
11- 'preset' : 'ts-jest' ,
7+ coverageThreshold : {
8+ global : {
9+ lines : 95 ,
10+ } ,
11+ } ,
12+ rootDir : 'lib' ,
13+ testRegex : '/lib/.*\\.spec\\.(ts|js)$' ,
14+ preset : 'ts-jest' ,
1215} ;
Original file line number Diff line number Diff line change 1919 "prebuild" : " rimraf dist" ,
2020 "build" : " tsc -p tsconfig.build.json" ,
2121 "test" : " jest" ,
22+ "coverage:ci" : " jest --coverage" ,
2223 "lint" : " tsc --noEmit && eslint ."
2324 },
2425 "peerDependencies" : {
You can’t perform that action at this time.
0 commit comments