Skip to content

De 113756 poc sonarqube implementation #85

De 113756 poc sonarqube implementation

De 113756 poc sonarqube implementation #85

Workflow file for this run

name: CI
on: [pull_request, workflow_dispatch]
jobs:
phpstan:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 7.4
- 8.0
- 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHPStan
run: composer phpstan
phpcs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 7.4
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --prefer-dist
- name: Run PHP CodeSniffer
run: composer phpcs
phpunit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- 7.4
- 8.0
- 8.1
composer-arg:
- install
- update --prefer-lowest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring
coverage: xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer ${{ matrix.composer-arg }} --prefer-dist
- name: Run PHPUnit
run: composer phpunit
phpunit-with-sonar-qube:
uses: BrandEmbassy/github-actions/.github/workflows/php-phpunit-with-sonar-qube.yml@master
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}