Skip to content

fix(pint): Code style #692

fix(pint): Code style

fix(pint): Code style #692

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
permissions:
contents: read
env:
DB_PASSWORD: 'root'
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
php: [8.3]
name: PHP ${{ matrix.php }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: xdebug
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Copy environment file
run: cp .env.example .env
- name: Generate app key
run: php artisan key:generate
- name: Generate JWT secret
run: php artisan jwt:secret -f
- name: Clear Config
run: php artisan config:clear
- name: Setup mysql
run: |
sudo systemctl start mysql.service
mysql -e 'CREATE DATABASE pflow_crm_test;' -uroot -proot
- name: Execute tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
# Adding SonarCloud Scan for test coverage
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}