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

Commit

Permalink
feat: add code coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Aug 8, 2018
1 parent 3fecb4e commit f8deb24
Show file tree
Hide file tree
Showing 5 changed files with 2,541 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

0 comments on commit f8deb24

Please sign in to comment.