Skip to content

chore(deps): update softprops/action-gh-release action to v2.6.1 #790

chore(deps): update softprops/action-gh-release action to v2.6.1

chore(deps): update softprops/action-gh-release action to v2.6.1 #790

Workflow file for this run

name: SonarCloud
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
permissions:
contents: read
steps:
- name: Install libmodsecurity
run: |
sudo apt-get update -y
sudo apt-get install -y libmodsecurity-dev
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: lts/*
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Install Build Wrapper
uses: SonarSource/sonarqube-scan-action/install-build-wrapper@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
- name: Run build-wrapper
run: |
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} npm run build
env:
CXXFLAGS: -Og --coverage -fprofile-abs-path -std=c++14
LDFLAGS: --coverage
- name: Run tests
run: npm test
- name: Process coverage report
run: |
mkdir coverage
cd coverage
find .. -name '*.o' | xargs gcov --preserve-paths
- name: Run sonar-scanner
uses: SonarSource/sonarqube-scan-action@a31c9398be7ace6bbfaf30c0bd5d415f843d45e9 # v7.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
"-Dsonar.cfamily.compile-commands=${{ env.BUILD_WRAPPER_OUT_DIR }}/compile_commands.json" -Dsonar.cfamily.gcov.reportsPath=coverage