Skip to content

Commit 1deaad2

Browse files
authored
Merge pull request #7 from atlp-rwanda/ch-setup-ci-187584863
Configure CircleCI and Add Status badge in readme
2 parents 5e1a4a2 + 7d74dbb commit 1deaad2

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

Diff for: .circleci/config.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2.1
2+
3+
jobs:
4+
test:
5+
docker:
6+
- image: cimg/node:current
7+
steps:
8+
- setup_remote_docker:
9+
version: docker24
10+
- checkout
11+
- run:
12+
name: Update npm
13+
command: "sudo npm install -g npm@latest"
14+
- run:
15+
name: Install dependencies
16+
command: npm install
17+
- run:
18+
name: Run tests and generate coverage
19+
command: |
20+
mkdir -p test-results
21+
npm test -- --watchAll=false --coverage --outputFile=test-results/jest.xml --json --useStderr
22+
- run:
23+
name: Upload coverage to Code Climate
24+
command: |
25+
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
26+
chmod +x ./cc-test-reporter
27+
./cc-test-reporter before-build
28+
./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.json coverage/lcov.info
29+
./cc-test-reporter upload-coverage
30+
./cc-test-reporter after-build --exit-code $?
31+
- store_test_results:
32+
path: test-results
33+
- store_artifacts:
34+
path: coverage
35+
destination: coverage
36+
37+
workflows:
38+
test_workflow:
39+
jobs:
40+
- test

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo
1616
[![Test Coverage](https://api.codeclimate.com/v1/badges/a7dce016f123cdcc9042/test_coverage)](https://codeclimate.com/github/atlp-rwanda/e-commerce-ninjas-fe/test_coverage)
1717
[![Netlify Status](https://api.netlify.com/api/v1/badges/a3ed5a75-a862-4f3b-ba21-8369180cf3e6/deploy-status)](https://app.netlify.com/sites/e-commerce-ninja-fn-staging/deploys)
1818
[![Coverage Status](https://coveralls.io/repos/github/atlp-rwanda/e-commerce-ninjas-fe/badge.svg)](https://coveralls.io/github/atlp-rwanda/e-commerce-ninjas-fe)
19+
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/atlp-rwanda/e-commerce-ninjas-fe/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/atlp-rwanda/e-commerce-ninjas-fe/tree/develop)
1920

2021
## Completed features
2122
- Setup empty react

0 commit comments

Comments
 (0)