Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches:
- develop
pull_request:
types: [opened, synchronize, reopened]

name: Sonarqube
jobs:
sonarqube:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
22 changes: 22 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Server and project configuration
sonar.host.url=https://sonar.wpengine.io/
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git

# Project identifiers
sonar.projectName=wpackagist
sonar.projectKey=wpengine_wpackagist_82f90787-67b8-45bc-8b47-99fbcfb1c1e7

# Language
sonar.language=php

# Paths to source code directories (relative paths)
sonar.sources=src

# Exclusions
sonar.exclusions=**/*_test.*, **/mocks/**, **/node_modules/**, **/vendor/**

# Paths to test code directories (relative paths)
sonar.tests=.
sonar.test.inclusions=**/*Test.php
Loading