Skip to content

chore(deps): update shivammathur/setup-php action to v2.30.0 #23

chore(deps): update shivammathur/setup-php action to v2.30.0

chore(deps): update shivammathur/setup-php action to v2.30.0 #23

Workflow file for this run

name: Static Code Analysis
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
permissions:
contents: read
jobs:
build:
name: Run SonarScanner
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
env:
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory
PHP_VERSION: 8.1
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Set up PHP
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # 2.30.0
with:
php-version: ${{ env.PHP_VERSION }}
tools: none
coverage: none
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@e4882e1621ad2fb48dddfa48287411bed34789b1 # v2
- name: Run build-wrapper
run: |
phpize
./configure --enable-coverage
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make coverage
env:
NO_INTERACTION: "1"
REPORT_EXIT_STATUS: "1"
TEST_PHP_EXECUTABLE: "/usr/bin/php"
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner \
-Dsonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" \
-Dsonar.cfamily.gcov.reportsPath=$(pwd)