From f14c6622c8213ee0611fd5f30ad99de36846446c Mon Sep 17 00:00:00 2001 From: Arunprasad Rajkumar Date: Fri, 6 Nov 2020 18:50:36 +0530 Subject: [PATCH] chore: Add code coverage report generation (#153) --- .github/workflows/ci-build.yml | 15 ++++++++++++--- README.md | 4 +++- package.json | 3 ++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 47bc0624..bc114526 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -1,6 +1,8 @@ name: CI Build on: + push: + branches: [ master ] pull_request: branches: [ master ] @@ -19,6 +21,13 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm run build - - run: npm test + - name: Install Dependencies + run: npm install + - name: Build + run: npm run build + - name: Run the unit tests + run: npm test -- --coverage + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index bbdb4889..71dccfc0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Dependency Analytics LSP Server -[![Build Status](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/badge/icon)](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/) +[![NPM Publish](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/badge/icon)](https://ci.centos.org/job/devtools-fabric8-analytics-lsp-server-npm-publish-build-master/) +[![codecov](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server/branch/master/graph/badge.svg?token=aVThXjheDf)](https://codecov.io/gh/fabric8-analytics/fabric8-analytics-lsp-server) +![CI Build](https://github.com/fabric8-analytics/fabric8-analytics-lsp-server/workflows/CI%20Build/badge.svg) Language Server(LSP) that can analyze your dependencies specified in `package.json` and `pom.xml`. diff --git a/package.json b/package.json index d35a885f..20b36625 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,8 @@ ], "reporter": [ "text", - "html" + "html", + "json" ], "sourceMap": true, "instrument": true