diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f10e97f..548d4d5d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,26 @@ jobs: - run: npm run build --if-present - run: npm test --if-present - run: npm run coverage --if-present + when: always + - run: + name: Run coverage + command: npm run coverage + when: always + - run: + name: Setup Code Climate test-reporter + command: | + # download test reporter as a static binary + 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 + when: always + - run: + name: Send coverage report to Code Climate + command: ./cc-test-reporter after-build -t lcov + when: always + - store_artifacts: + path: ./coverage/lcov.info + prefix: tests - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 env: diff --git a/.gitignore b/.gitignore index 90d29ba5..1adebdeb 100644 --- a/.gitignore +++ b/.gitignore @@ -26,5 +26,5 @@ coverage .nyc_output .vscode .cache_ggshield -dist/ +dist diff --git a/README.md b/README.md index 3c1662fb..c6579838 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ This is the backend for E-Commerce-Ninjas, written in Node.js with TypeScript. [![Maintainability](https://api.codeclimate.com/v1/badges/839fc3fa18d25362cd8b/maintainability)](https://codeclimate.com/github/atlp-rwanda/e-commerce-ninjas-bn/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/839fc3fa18d25362cd8b/test_coverage)](https://codeclimate.com/github/atlp-rwanda/e-commerce-ninjas-bn/test_coverage) [![Coverage Status](https://coveralls.io/repos/github/atlp-rwanda/e-commerce-ninjas-bn/badge.svg)](https://coveralls.io/github/atlp-rwanda/e-commerce-ninjas-bn) -[![CircleCI](https://dl.circleci.com/status-badge/img/gh/atlp-rwanda/e-commerce-ninjas-bn/tree/develop.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/atlp-rwanda/e-commerce-ninjas-bn/tree/develop) [![codecov](https://codecov.io/gh/atlp-rwanda/e-commerce-ninjas-bn/graph/badge.svg?token=6ZWudFPM1S)](https://codecov.io/gh/atlp-rwanda/e-commerce-ninjas-bn) ## HOSTED SERVER URL