Skip to content

Commit

Permalink
Merge pull request #13 from santoshshinde2012/dev
Browse files Browse the repository at this point in the history
update github action workflow
  • Loading branch information
santoshshinde2012 authored May 15, 2024
2 parents 5131cf5 + dbde65b commit 37221d0
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 735 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on:
push:
branches: [ "main", "dev" ]
pull_request:
types: [opened, synchronize, reopened]
branches: [ "main" ]

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-ts-sequelize-pg-boilerplate
-Dsonar.projectName=node-ts-sequelize-pg-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 }}
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '17 10 * * 2'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/njsscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ name: njsscan sarif

on:
push:
branches: [ "master", "dev" ]
branches: [ "main", "dev" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master", "dev" ]
branches: [ "main", "dev" ]
schedule:
- cron: '30 7 * * 0'

Expand Down
38 changes: 0 additions & 38 deletions .github/workflows/node.js.yml

This file was deleted.

20 changes: 0 additions & 20 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/
coverage/lcov-report
coverage/coverage-final.json
coverage/clover.xml
Expand Down
Loading

0 comments on commit 37221d0

Please sign in to comment.