From f1b041b064a98648594e284cd6b93b1861229566 Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 24 Nov 2019 17:46:33 +0100 Subject: [PATCH] chore(code-quality): setup codeclimate coveralls include badges in readme and setup travis config [Delivers #5] --- .travis.yml | 13 ++++++++++--- README.md | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25a04f4..919688d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,16 @@ language: node_js node_js: -- '10' + - '10' services: -- postgresql + - postgresql before_script: -- psql -c 'CREATE DATABASE teamwork_test_db' -U postgres + - psql -c 'CREATE DATABASE teamwork_test_db' -U postgres + - 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 +after_script: + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT + - npm run coverage env: global: - DB_USER=postgres @@ -12,6 +18,7 @@ env: - DB_PORT=5432 - DB_PASSWORD='' - DB_HOST=localhost + - CC_TEST_REPORTER_ID=b9dffe64ff9b1570eef3cc69cc4add47938822ca6127ef69e2d26e2f2ca55e1b deploy: provider: heroku api_key: diff --git a/README.md b/README.md index 62af07b..f4b4435 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,9 @@ Rest API for teamwork application's backend [![Build Status](https://travis-ci.org/dave-ok/devc-teamwork-rest-api.svg?branch=develop)](https://travis-ci.org/dave-ok/devc-teamwork-rest-api) + +[![Maintainability](https://api.codeclimate.com/v1/badges/8c99a037234ec5b25e31/maintainability)](https://codeclimate.com/github/dave-ok/devc-teamwork-rest-api/maintainability) + +[![Test Coverage](https://api.codeclimate.com/v1/badges/8c99a037234ec5b25e31/test_coverage)](https://codeclimate.com/github/dave-ok/devc-teamwork-rest-api/test_coverage) + +[![Coverage Status](https://coveralls.io/repos/github/dave-ok/devc-teamwork-rest-api/badge.svg?branch=develop)](https://coveralls.io/github/dave-ok/devc-teamwork-rest-api?branch=develop) \ No newline at end of file