mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
Merge pull request #116 from oceanprotocol/feature/coverage
Setup coverage reporting
This commit is contained in:
commit
1585149a00
@ -3,9 +3,14 @@ language: node_js
|
||||
node_js:
|
||||
- '11'
|
||||
|
||||
before_install:
|
||||
- npm install -g npm
|
||||
- npm install -g codacy-coverage
|
||||
|
||||
script:
|
||||
# - ./scripts/install.sh # runs automatically with npm ci
|
||||
- ./scripts/test.sh
|
||||
- ./scripts/coverage.sh
|
||||
- ./scripts/build.sh
|
||||
|
||||
notifications:
|
||||
|
@ -6,6 +6,8 @@
|
||||
> https://commons.oceanprotocol.com
|
||||
|
||||
[![Build Status](https://travis-ci.com/oceanprotocol/commons.svg?branch=master)](https://travis-ci.com/oceanprotocol/commons)
|
||||
[![Codacy Badge](https: //api.codacy.com/project/badge/Grade/6a19987e62344b1c9c1d5bc9f315c733)](https://www.codacy.com/app/ocean-protocol/commons)
|
||||
[![Codacy Badge](https: //api.codacy.com/project/badge/Coverage/6a19987e62344b1c9c1d5bc9f315c733)](https://www.codacy.com/app/ocean-protocol/commons)
|
||||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-7b1173.svg?style=flat-square)](https://github.com/prettier/prettier)
|
||||
[![js oceanprotocol](https://img.shields.io/badge/js-oceanprotocol-7b1173.svg)](https://github.com/oceanprotocol/eslint-config-oceanprotocol)
|
||||
[![css bigchaindb](https://img.shields.io/badge/css-bigchaindb-39BA91.svg)](https://github.com/bigchaindb/stylelint-config-bigchaindb)
|
||||
|
@ -8,7 +8,8 @@
|
||||
"build": "react-scripts --max_old_space_size=4096 build",
|
||||
"test": "react-scripts test --coverage",
|
||||
"test:watch": "react-scripts test --coverage --watch",
|
||||
"eject": "react-scripts eject"
|
||||
"eject": "react-scripts eject",
|
||||
"coverage": "cat coverage/lcov.info | codacy-coverage --token 8801f827fe1144ffa85cd7da94f2bbf7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oceanprotocol/art": "^2.2.0",
|
||||
|
12
scripts/coverage.sh
Executable file
12
scripts/coverage.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#/usr/bin/env/sh
|
||||
set -e
|
||||
|
||||
components="server client"
|
||||
|
||||
for component in $components
|
||||
do
|
||||
printf "\n\nReporting coverage: $component\n"
|
||||
cd $component
|
||||
npm run coverage
|
||||
cd ..
|
||||
done
|
@ -5,7 +5,7 @@ components="server client"
|
||||
|
||||
for component in $components
|
||||
do
|
||||
echo "\n\nInstalling dependencies: $component\n"
|
||||
printf "\n\nInstalling dependencies: $component\n"
|
||||
cd $component
|
||||
npm install
|
||||
cd ..
|
||||
|
@ -9,7 +9,8 @@
|
||||
"serve": "node dist/server.js",
|
||||
"build": "tsc",
|
||||
"test": "jest --coverage",
|
||||
"test:watch": "jest --coverage --watch"
|
||||
"test:watch": "jest --coverage --watch",
|
||||
"coverage": "cat coverage/lcov.info | codacy-coverage --token 8801f827fe1144ffa85cd7da94f2bbf7"
|
||||
},
|
||||
"dependencies": {
|
||||
"body-parser": "^1.18.3",
|
||||
|
Loading…
Reference in New Issue
Block a user