Files
Card-Collection-Manager-3/.github/workflows/feature-ci.yml
T
Sebastian Dine 2d2d91b38b patch: sonarqube (#2)
* sonarqube

* sonarqube

---------

Co-authored-by: sdine <sdine@sdine.com>
2026-05-09 14:31:36 +02:00

61 lines
1.5 KiB
YAML

name: Feature CI
on:
push:
branches-ignore:
- master
permissions:
contents: read
jobs:
sonarqube:
name: SonarQube Cloud scan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Compute Sonar project key
run: echo "SONAR_PROJECT_KEY=${GITHUB_REPOSITORY/\//_}" >> "$GITHUB_ENV"
- name: Install scan prerequisites
run: >
sudo apt-get update &&
sudo apt-get install -y
cmake
ninja-build
pkg-config
libgtk-3-dev
libwxgtk3.2-dev
- name: Generate compile commands
run: >
cmake -S . -B build -G Ninja
-DCCM_BUILD_TESTS=OFF
-DCCM_USE_SYSTEM_WX=ON
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: SonarQube Cloud scan
uses: SonarSource/sonarqube-scan-action@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=${{ github.repository_owner }}
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
-Dsonar.sources=core,ui_wx,app
-Dsonar.cfamily.compile-commands=build/compile_commands.json
linux:
name: Linux build + tests
uses: ./.github/workflows/feature-linux.yml
windows:
name: Windows build + tests
uses: ./.github/workflows/feature-windows.yml