Skip to content

ci: update sonarcloud token name #118

ci: update sonarcloud token name

ci: update sonarcloud token name #118

Workflow file for this run

name: Tests
on:
- push
jobs:
build-test:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install gcovr
run: pip3 install gcovr
- name: Setup sonar cloud
uses: SonarSource/[email protected]
- name: Build tests
run: cmake -B build -S .
- name: Build tests (linux)
if: matrix.platform == 'ubuntu-latest'
run: build-wrapper-linux-x86-64 --out-dir bw-output cmake --build build
- name: Build tests (macos)
if: matrix.platform == 'macos-latest'
run: build-wrapper-macosx-x86 --out-dir bw-output cmake --build build
- name: Run tests and coverage
run: ./build/tests/tests
- name: Generate coverage report
run: gcovr --sonarqube -o coverage.xml build
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.AUTERION_CI_SONAR_TOKEN }}
run: |
sonar-scanner \
--define sonar.cfamily.build-wrapper-output="bw-output" \
--define sonar.coverageReportPaths=coverage.xml