Skip to content

Commit

Permalink
Merge pull request #151
Browse files Browse the repository at this point in the history
Sonar
  • Loading branch information
sercheo87 authored Jun 8, 2024
2 parents 87faddd + 77fdb2d commit 7509d2d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 37 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/npm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,16 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 20
- run: npm install
- run: npm run lint
- run: npm run test
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run sonarqube
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: sonar-scanner
-Dsonar.sources=.
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectKey=convert-postman-jmeter
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

16 changes: 5 additions & 11 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 20
- run: npm install
- run: npm run lint
- run: npm run test
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run sonarqube
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: sonar-scanner
-Dsonar.sources=.
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectKey=convert-postman-jmeter
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

publish-npm:
needs: build
Expand Down
16 changes: 5 additions & 11 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 20
- run: npm install
- run: npm run lint
- run: npm run test
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run sonarqube
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
run: sonar-scanner
-Dsonar.sources=.
-Dsonar.exclusions=node_modules/**,sonar-scanner-3.3.0.1492-linux/**
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.projectKey=convert-postman-jmeter
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
Expand Down
6 changes: 2 additions & 4 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# must be unique in a given SonarQube instance
sonar.organization=sercheo87-github
sonar.projectKey=convert-postman-jmeter
sonar.projectKey=sercheo87_convert-postman-jmeter
sonar.organization=sercheo87
# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
sonar.projectName=convert-postman-jmeter
sonar.projectVersion=1.0.3

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
# This property is optional if sonar.modules is set.
sonar.sources=.

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

0 comments on commit 7509d2d

Please sign in to comment.