Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

CI

CI #127

Workflow file for this run

name: CI
on:
push:
pull_request:
branches: [main, develop]
schedule:
- cron: '0 0 1 * *'
jobs:
php-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
os: [ ubuntu-latest, windows-latest ]
name: PHP${{ matrix.php }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
coverage: xdebug
env:
update: true
- name: Install dependencies
run: |
composer self-update
composer install --no-interaction --no-progress
- name: Execute tests
run: vendor/bin/phpunit -c phpunit.xml.dist
- name: Prepare SonarCloud Scan
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' .coverage/clover.xml
if: ${{ matrix.php == '8.2' && matrix.os == 'ubuntu-latest' }}
- name: SonarCloud Scan
uses: SonarSource/[email protected]
if: ${{ matrix.php == '8.2' && matrix.os == 'ubuntu-latest' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}