-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from santoshshinde2012/dev
update github action workflow
- Loading branch information
Showing
13 changed files
with
156 additions
and
735 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.