mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
report test coverage to Codacy
This commit is contained in:
parent
82906093e6
commit
5e8ed026d5
@ -3,9 +3,14 @@ language: node_js
|
|||||||
node_js:
|
node_js:
|
||||||
- '11'
|
- '11'
|
||||||
|
|
||||||
|
before_install:
|
||||||
|
- npm install -g npm
|
||||||
|
- npm install -g codacy-coverage
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# - ./scripts/install.sh # runs automatically with npm ci
|
# - ./scripts/install.sh # runs automatically with npm ci
|
||||||
- ./scripts/test.sh
|
- ./scripts/test.sh
|
||||||
|
- ./scripts/coverage.sh
|
||||||
- ./scripts/build.sh
|
- ./scripts/build.sh
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
@ -8,7 +8,8 @@
|
|||||||
"build": "react-scripts --max_old_space_size=4096 build",
|
"build": "react-scripts --max_old_space_size=4096 build",
|
||||||
"test": "react-scripts test --coverage",
|
"test": "react-scripts test --coverage",
|
||||||
"test:watch": "react-scripts test --coverage --watch",
|
"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": {
|
"dependencies": {
|
||||||
"@oceanprotocol/art": "^2.2.0",
|
"@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
|
for component in $components
|
||||||
do
|
do
|
||||||
echo "\n\nInstalling dependencies: $component\n"
|
printf "\n\nInstalling dependencies: $component\n"
|
||||||
cd $component
|
cd $component
|
||||||
npm install
|
npm install
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"serve": "node dist/server.js",
|
"serve": "node dist/server.js",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"test": "jest --coverage",
|
"test": "jest --coverage",
|
||||||
"test:watch": "jest --coverage --watch"
|
"test:watch": "jest --coverage --watch",
|
||||||
|
"coverage": "cat coverage/lcov.info | codacy-coverage --token 8801f827fe1144ffa85cd7da94f2bbf7"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
|
Loading…
Reference in New Issue
Block a user