Skip to content

Commit

Permalink
Merge pull request #7 from atlp-rwanda/ch-setup-ci-187584863
Browse files Browse the repository at this point in the history
Configure CircleCI and Add Status badge in readme
  • Loading branch information
key-joshua authored Jul 1, 2024
2 parents 5e1a4a2 + 7d74dbb commit 1deaad2
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2.1

jobs:
test:
docker:
- image: cimg/node:current
steps:
- setup_remote_docker:
version: docker24
- checkout
- run:
name: Update npm
command: "sudo npm install -g npm@latest"
- run:
name: Install dependencies
command: npm install
- run:
name: Run tests and generate coverage
command: |
mkdir -p test-results
npm test -- --watchAll=false --coverage --outputFile=test-results/jest.xml --json --useStderr
- run:
name: Upload coverage to Code Climate
command: |
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
./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.json coverage/lcov.info
./cc-test-reporter upload-coverage
./cc-test-reporter after-build --exit-code $?
- store_test_results:
path: test-results
- store_artifacts:
path: coverage
destination: coverage

workflows:
test_workflow:
jobs:
- test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Our e-commerce web application server, developed by Team Ninjas, facilitates smo
[![Test Coverage](https://api.codeclimate.com/v1/badges/a7dce016f123cdcc9042/test_coverage)](https://codeclimate.com/github/atlp-rwanda/e-commerce-ninjas-fe/test_coverage)
[![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)
[![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)
[![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)

## Completed features
- Setup empty react
Expand Down

0 comments on commit 1deaad2

Please sign in to comment.