Skip to content
This repository has been archived by the owner on May 31, 2019. It is now read-only.

Commit

Permalink
Merge pull request #48 from aerogear/coverage
Browse files Browse the repository at this point in the history
feat: add code coverage reporting
  • Loading branch information
Dara Hayes committed Aug 8, 2018
2 parents 3fecb4e + 0d46962 commit 299609a
Show file tree
Hide file tree
Showing 6 changed files with 2,543 additions and 93 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,46 @@ jobs:
path: ~/reports
- store_artifacts:
path: ~/reports

test_coverage:
docker:
# Node 8 LTS
- image: circleci/node:carbon
# configuration database
- image: circleci/postgres:9.6.2-alpine
name: config_postgres
environment:
POSTGRES_USER: postgresql
POSTGRES_PASSWORD: postgres
POSTGRES_DB: aerogear_data_sync_db
# memeolist database
- image: circleci/postgres:9.6.2-alpine
name: memeolist_postgres
environment:
POSTGRES_USER: postgresql
POSTGRES_PASSWORD: postgres
POSTGRES_DB: memeolist_db
steps:
- checkout
- run:
name: Wait for configuration database to start up
command: dockerize -wait tcp://config_postgres:5432 -timeout 120s
- run:
name: Wait for memeolist database to start up
command: dockerize -wait tcp://memeolist_postgres:5432 -timeout 120s
- run: npm install
- run:
command: npm run db:init
environment:
POSTGRES_HOST: 'config_postgres'
POSTGRES_PORT: '5432'
- run:
command: npm run test:cover
environment:
POSTGRES_HOST: 'config_postgres'
POSTGRES_PORT: '5432'
MEMEOLIST_DB_HOST: 'memeolist_postgres'
MEMEOLIST_DB_PORT: '5432'

docker_push_master:
docker:
Expand Down Expand Up @@ -89,6 +129,10 @@ workflows:
filters:
tags:
only: /.*/
- test_coverage:
filters:
tags:
only: /.*/
- docker_push_master:
requires:
- unit_test
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
.vscode/
.idea
coverage
.nyc_output
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

GraphQL based data sync server for mobile, with backend integration capabilities

[![CircleCI](https://circleci.com/gh/aerogear/data-sync-server.svg?style=svg)](https://circleci.com/gh/aerogear/data-sync-server)
[![Coverage Status](https://coveralls.io/repos/github/aerogear/data-sync-server/badge.svg)](https://coveralls.io/github/aerogear/data-sync-server)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Getting Started
Expand Down
Loading

0 comments on commit 299609a

Please sign in to comment.