Skip to content

Commit

Permalink
update sonar report and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshshinde2012 committed May 16, 2024
1 parent e3a42db commit 5f6d957
Show file tree
Hide file tree
Showing 10 changed files with 114 additions and 426 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: CI
on:
push:
branches:
- main
- master
- dev
- release-*
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- master
- dev
- release-*

jobs:
CI:
strategy:
matrix:
node-version: [18.x]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up nodejs version ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Clean Cache
run: npm cache clean --force
- name: Install package
run: npm install
- name: Build
run: npm run build --if-present
- name: Test
run: npm run test
- name: CodeClimate Scan
uses: paambaati/codeclimate-action@v6.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TOKEN }}
with:
coverageLocations: |
${{github.workspace}}/coverage/*.info:lcov
${{github.workspace}}/coverage/clover.xml:clover
debug: true
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=santoshshinde2012
-Dsonar.projectKey=santoshshinde2012_node-boilerplate
-Dsonar.projectName=node-boilerplate
-Dsonar.projectVersion=1.0
-Dsonar.sources=.
-Dsonar.exclusions=**/tests/**/*.ts
-Dsonar.test.inclusions=**/tests/**/*.ts
-Dsonar.coverage.exclusions=**/tests/**/*.ts,/**/src/server.ts,node_modules/*,coverage/lcov-report/*
-Dsonar.language=ts
-Dsonar.tests=./tests
-Dsonar.verbose=false
-Dsonar.sourceEncoding=UTF-8
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.testExecutionReportPaths=./coverage/sonar-report.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/node.js.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/sonarcloud-scan.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ build/
tmp/
temp/
logs
coverage
coverage/lcov.info
coverage/lcov-report
coverage/coverage-final.json
coverage/clover.xml
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [Node-Typescript-Boilerplate](https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=santoshshinde2012_node-boilerplate&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=santoshshinde2012_node-boilerplate)![Github action workflow status](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/node.js.yml/badge.svg?branch=master)![CodeQL Analysis](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)![njsscan Analysis](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/njsscan.yml/badge.svg?branch=master)![Maintainability](https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/maintainability)![Test Coverage](https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/test_coverage)
# [Node-Typescript-Boilerplate](https://blog.santoshshinde.com/skeleton-for-node-js-apps-written-in-typescript-444fa1695b30) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=santoshshinde2012_node-boilerplate&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=santoshshinde2012_node-boilerplate)![Github action workflow status](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/ci.yml/badge.svg?branch=master)![CodeQL Analysis](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)![njsscan Analysis](https://github.com/santoshshinde2012/node-boilerplate/actions/workflows/njsscan.yml/badge.svg?branch=master)![Maintainability](https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/maintainability)![Test Coverage](https://api.codeclimate.com/v1/badges/0e53f5d93de102b39641/test_coverage)

Skeleton for Node.js applications written in TypeScript

Expand Down
Loading

0 comments on commit 5f6d957

Please sign in to comment.