Skip to content

Commit

Permalink
Merge c4aa7c8 into 524fc0d
Browse files Browse the repository at this point in the history
  • Loading branch information
e-ian committed May 2, 2019
2 parents 524fc0d + c4aa7c8 commit 228ad4b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Javascript Node CircleCI 2.0 configuration file

version: 2
jobs:
build:
docker:
- image: circleci/node:10.15.3
steps:
- checkout
- attach_workspace:
at: ~/repo/tmp
- run: npm install

- run:
name: Download cc-test-reporter
command: |
mkdir -p tmp/
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter
chmod +x ./tmp/cc-test-reporter
- persist_to_workspace:
root: tmp
paths:
- cc-test-reporter
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- run:
name: Run frontend tests
command: |
npm run test
./tmp/cc-test-reporter format-coverage -t lcov -o tmp/codeclimate.frontend.json coverage/lcov.info
- run:
name: Upload coverage results to Code Climate
command: |
./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.frontend.json
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,16 @@ node_js:
cache:
directories:
- node_modules
env:
global:
- CC_TEST_REPORTER_ID=1a1ba6ab2f82f5d4b81a9396c079eb32f7e9ebc04dbb9c640d23be9fff3b25a3
before_script:
- export CC_TEST_REPORTER_ID=1a1ba6ab2f82f5d4b81a9396c079eb32f7e9ebc04dbb9c640d23be9fff3b25a3
- 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
script:
- npm run test:coveralls

after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

[![Build Status](https://travis-ci.org/andela/ah-frontend-prime.svg?branch=develop)](https://travis-ci.org/andela/ah-frontend-prime)
[![Coverage Status](https://coveralls.io/repos/github/andela/ah-frontend-prime/badge.svg?branch=develop)](https://coveralls.io/github/andela/ah-frontend-prime?branch=develop)
[![CircleCI](https://circleci.com/gh/andela/ah-frontend-prime/tree/develop.svg?style=svg)](https://circleci.com/gh/andela/ah-frontend-prime/tree/develop)
[![Maintainability](https://api.codeclimate.com/v1/badges/50114cd315c9f8388ae6/maintainability)](https://codeclimate.com/github/andela/ah-frontend-prime/maintainability)

0 comments on commit 228ad4b

Please sign in to comment.