Skip to content

[actions] updated github actions for sonarcloud #223

[actions] updated github actions for sonarcloud

[actions] updated github actions for sonarcloud #223

Workflow file for this run

name: C/C++ CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
environment: dev
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.8 for gcovr
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install gcovr 5.0
run: |
pip install gcovr==5.0
- name: init
run: |
./bin/init.sh --init --no-update --no-upgrade --lcov --clangd --setup
- name: coverage
run: |
./bin/coverageall.sh --all
- name: collect
run: |
gcovr --sonarqube > coverage/coverage.xml
- name: SonarQube sScan
uses: SonarSource/sonarqube-scan-action@v4
env:
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
with:
args: >
--define sonar.coverageReportPaths=coverage/coverage.xml
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]