Skip to content

fix sq

fix sq #5

Workflow file for this run

name: code-quality
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
scrutinizer:
name: Scrutinizer
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: xdebug
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover=coverage.clover
- name: Upload coverage to Scrutinizer
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover coverage.clover"
wait-for-analysis: true
env:
SCRUTINIZER_TOKEN: ${{ secrets.SCRUTINIZER_TOKEN }}