Per #2379, move more config logic from sonar-project.properties into … #3
Workflow file for this run
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
name: SonarQube Static Code Analysis | ||
# Run SonarQube for Pull Requests and changes to the develop and main_vX.Y branches | ||
on: | ||
# Trigger analysis for pushes to develop and main_vX.Y branches | ||
# TODO: Remove feature_2379_sonarqube_gha prior to submitting PR | ||
push: | ||
branches: | ||
- develop | ||
- 'main_v**' | ||
- feature_2379_sonarqube_gha | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/pull_request_template.md' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
- '.github/labels/**' | ||
- '**/README.md' | ||
- '**/LICENSE.md' | ||
# Trigger analysis for pull requests to develop and main_vX.Y branches | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: | ||
- develop | ||
- 'main_v**' | ||
- feature_2379_sonarqube_gha | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/pull_request_template.md' | ||
- '.github/ISSUE_TEMPLATE/**' | ||
- '.github/labels/**' | ||
- '**/README.md' | ||
- '**/LICENSE.md' | ||
# Add manual trigger | ||
workflow_dispatch: | ||
jobs: | ||
scan_c++: | ||
Check failure on line 41 in .github/workflows/sonarqube.yml GitHub Actions / SonarQube Static Code AnalysisInvalid workflow file
Check failure on line 41 in .github/workflows/sonarqube.yml GitHub Actions / SonarQube Static Code AnalysisInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: SonarQube C++ Scan | ||
uses: sonarsource/sonarqube-scan-action@master | ||
with: | ||
projectBaseDir: src | ||
args: > | ||
-Dsonar.cfamily.build-wrapper-output=bw-outputs | ||
-Dsonar.sourceEncoding=UTF-8 | ||
-Dsonar.verbose=true | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | ||
scan_python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: SonarQube Python Scan | ||
uses: sonarsource/sonarqube-scan-action@master | ||
with: | ||
projectBaseDir: scripts/python,data/wrappers | ||
args: > | ||
-Dsonar.python.version=3.6.3 | ||
-Dsonar.sourceEncoding=UTF-8 | ||
-Dsonar.verbose=true | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} |