Skip to content

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

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

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

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up PHP
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # 2.32.0
with:
php-version: ${{ env.PHP_VERSION }}
tools: none
coverage: none
- name: Install sonar-scanner and build-wrapper
uses: SonarSource/sonarcloud-github-c-cpp@816b1822d71776ee0d32bc012e95024ec52ac1fc # v3
- 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)