Skip to content

Commit

Permalink
refactor: replace codacy with sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
kronenthaler committed Oct 11, 2023
1 parent a197be5 commit 4f45cb5
Showing 1 changed file with 44 additions and 5 deletions.
49 changes: 44 additions & 5 deletions .github/workflows/branch-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,48 @@ jobs:
- name: Test
run: make coverage

- name: Codacy
if: github.event_name != 'pull_request'
uses: codacy/codacy-coverage-reporter-action@v1
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: github.event_name == 'pull_request'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage.xml
args: >
-Dsonar.projectVersion=${{ env.VERSION }}
-Dsonar.pullrequest.key=${{ github.event.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.organization=kronenthaler
-Dsonar.projectKey=kronenthaler_openstep-parser
-Dsonar.projectName=openstep-parser
-Dsonar.python.version=3
-Dsonar.python.coverage.reportPaths=tests/coverage.xml
-Dsonar.sources=openstep_parser/
-Dsonar.tests=tests/
-Dsonar.verbose=true
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
if: github.event_name == 'push'
with:
args: >
-Dsonar.projectVersion=${{ env.VERSION }}
-Dsonar.branch.name=${{ github.ref_name }}
-Dsonar.organization=kronenthaler
-Dsonar.projectKey=kronenthaler_openstep-parser
-Dsonar.projectName=openstep-parser
-Dsonar.python.version=3
-Dsonar.python.coverage.reportPaths=tests/coverage.xml
-Dsonar.sources=openstep_parser/
-Dsonar.tests=tests/
-Dsonar.verbose=true
-Dsonar.c.file.suffixes=-
-Dsonar.cpp.file.suffixes=-
-Dsonar.objc.file.suffixes=-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit 4f45cb5

Please sign in to comment.