1
0
mirror of https://github.com/oceanprotocol/ocean.js.git synced 2024-11-26 20:39:05 +01:00

codeclimate setup & coverage reporting

This commit is contained in:
Matthias Kretschmann 2020-09-04 12:18:38 +02:00
parent 65261a6740
commit f726340a11
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,11 @@ before_install:
- npm install -g npm
before_script:
# CodeClimate test reporter setup
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
# Barge setup
- git clone https://github.com/oceanprotocol/barge
- cd barge
- git checkout v3
@ -30,6 +35,12 @@ script:
- npm run test:unit:cover
- npm run test:integration:cover
after_script:
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.unit.json coverage/unit/lcov.info # Format unit test coverage
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.integration.json coverage/integration/lcov.info # Format integration test coverage
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json
notifications:
email: false

View File

@ -6,6 +6,8 @@
[![npm](https://img.shields.io/npm/v/@oceanprotocol/lib.svg)](https://www.npmjs.com/package/@oceanprotocol/lib)
[![Build Status](https://travis-ci.com/oceanprotocol/ocean-lib-js.svg?token=soMi2nNfCZq19zS1Rx4i&branch=main)](https://travis-ci.com/oceanprotocol/ocean-lib-js)
[![Maintainability](https://api.codeclimate.com/v1/badges/58a59c9029ac615acadc/maintainability)](https://codeclimate.com/repos/5f521329523d1e017600e2ae/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/58a59c9029ac615acadc/test_coverage)](https://codeclimate.com/repos/5f521329523d1e017600e2ae/test_coverage)
[![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)