File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,19 @@ cache:
10
10
install :
11
11
- yarn install --frozen-lockfile
12
12
13
+ before_script :
14
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
15
+ - chmod +x ./cc-test-reporter
16
+
13
17
script :
18
+ - yarn test
19
+ - ' if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./cc-test-reporter format-coverage -t lcov coverage/lcov.info -o coverage/codeclimate.json; fi'
14
20
- yarn build:rollup
15
21
- yarn build:storybook
16
22
23
+ after_script :
24
+ - ' if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ./cc-test-reporter upload-coverage; fi'
25
+
17
26
deploy :
18
27
- provider : pages
19
28
local_dir : storybook-static
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ module.exports = {
7
7
'^.+\\.tsx?$' : 'ts-jest'
8
8
} ,
9
9
testMatch : [ '**/*.test.(ts|tsx)' ] ,
10
+ collectCoverageFrom : [ '**/!(*.stories).(ts|tsx)' ] ,
10
11
moduleNameMapper : { }
11
12
} ;
Original file line number Diff line number Diff line change 49
49
"scripts" : {
50
50
"build" : " yarn build:rollup" ,
51
51
"dev" : " yarn dev:storybook" ,
52
- "test" : " jest" ,
52
+ "test" : " jest --coverage " ,
53
53
"pretest" : " yarn build" ,
54
- "dev:test" : " jest --watch " ,
54
+ "dev:test" : " jest --watchAll --coverage " ,
55
55
"dev:rollup" : " rollup -c --w" ,
56
56
"dev:storybook" : " start-storybook -p 6006" ,
57
57
"build:rollup" : " rollup -c" ,
You can’t perform that action at this time.
0 commit comments