Skip to content

chore(deps): drop support to php < 8.1 and sf < 5.4 #9

chore(deps): drop support to php < 8.1 and sf < 5.4

chore(deps): drop support to php < 8.1 and sf < 5.4 #9

Workflow file for this run

name: Tests
on:
push:
pull_request:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php_version:
- '8.1'
- '8.2'
name: PHP ${{ matrix.php_version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup PHP with pecl extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}
tools: infection
ini-values: zend.assertions=1,assert.exception=1,assert.active=1
coverage: pcov
- run: composer install
- run: vendor/bin/phpunit --coverage-clover phpunit/phpunit.coverage.xml --coverage-xml phpunit/coverage-xml --log-junit phpunit/junit.xml
- run: infection --threads=4 --logger-github --coverage=phpunit
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
- name: Set repository name
id: repository-name
run: |
echo "REPOSITORY_NAME=$(echo $GITHUB_REPOSITORY | tr '/' '_')" >> $GITHUB_OUTPUT
echo "REPOSITORY_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1)" >> $GITHUB_OUTPUT
- name: fix code coverage paths
working-directory: ./phpunit
run: |
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' phpunit.coverage.xml
sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' junit.xml
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args:
-Dsonar.projectKey=${{ steps.repository-name.outputs.REPOSITORY_NAME }}
-Dsonar.organization=${{ steps.repository-name.outputs.REPOSITORY_OWNER }}
-Dsonar.sources=src
-Dsonar.tests=tests
-Dsonar.php.coverage.reportPaths=phpunit/phpunit.coverage.xml
-Dsonar.php.tests.reportPath=phpunit/junit.xml