Skip to content

Commit

Permalink
Update sonar-project.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
videshpande06 authored Jan 25, 2024
1 parent fccdda5 commit b59c856
Showing 1 changed file with 6 additions and 35 deletions.
41 changes: 6 additions & 35 deletions .github/workflows/sonar-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@ on:
workflow_dispatch:

jobs:
sonarqube:
phpunit:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
php-version:
- 7.4

steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -31,39 +26,15 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist

- name: Run phpstan
run: composer phpstan

phpunit:
- name: Run PHPUnit tests and Generate covwerage report
run: vendor/bin/phpunit --coverage-clover=coverage.xml
sonarqube:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
composer-arg:
- "install"
- "update --prefer-lowest"
php-version:
- 7.4
needs: phpunit
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, sockets
- name: Install dependencies
run: composer ${{ matrix.composer-arg }} --prefer-dist

- name: Run tests with phpunit/phpunit
run: vendor/bin/phpunit --coverage-clover=coverage.xml- --testdox
- name: Debug Information

run: |
php --version
composer --version
cat composer.json

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@master
Expand Down

0 comments on commit b59c856

Please sign in to comment.