Fix scrutinizer #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PHPUnit | |
on: [ push ] | |
jobs: | |
PHPUnit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
PHP: [ "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" ] | |
Bitrix: [ "18.5", "19.0", "20.0", "20.5", "21.400", "22.600" ] | |
exclude: | |
- { PHP: "7.3", Bitrix: "22.600" } | |
- { PHP: "8.0", Bitrix: "18.5" } | |
- { PHP: "8.0", Bitrix: "19.0" } | |
- { PHP: "8.0", Bitrix: "20.0" } | |
- { PHP: "8.0", Bitrix: "20.5" } | |
- { PHP: "8.0", Bitrix: "21.400" } | |
- { PHP: "8.1", Bitrix: "18.5" } | |
- { PHP: "8.1", Bitrix: "19.0" } | |
- { PHP: "8.1", Bitrix: "20.0" } | |
- { PHP: "8.1", Bitrix: "20.5" } | |
- { PHP: "8.1", Bitrix: "21.400" } | |
- { PHP: "8.2", Bitrix: "18.5" } | |
- { PHP: "8.2", Bitrix: "19.0" } | |
- { PHP: "8.2", Bitrix: "20.0" } | |
- { PHP: "8.2", Bitrix: "20.5" } | |
- { PHP: "8.2", Bitrix: "21.400" } | |
- { PHP: "8.3", Bitrix: "18.5" } | |
- { PHP: "8.3", Bitrix: "19.0" } | |
- { PHP: "8.3", Bitrix: "20.0" } | |
- { PHP: "8.3", Bitrix: "20.5" } | |
- { PHP: "8.3", Bitrix: "21.400" } | |
container: | |
image: webdevops/php-dev:${{ matrix.PHP }} | |
env: | |
MYSQL_HOST: mysql | |
MYSQL_DATABASE: entity-mapper | |
MYSQL_USER: entity-mapper | |
MYSQL_PASSWORD: entity-mapper | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_RANDOM_ROOT_PASSWORD: "yes" | |
MYSQL_DATABASE: entity-mapper | |
MYSQL_USER: entity-mapper | |
MYSQL_PASSWORD: entity-mapper | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v1 | |
- name: Fix for https://github.com/actions/runner-images/issues/6775 | |
run: | | |
chown root:root . | |
git config --global --add safe.directory /__w/bitrix-entity-mapper/bitrix-entity-mapper | |
- name: Set up environment | |
run: | | |
echo 'short_open_tag=1' >> /opt/docker/etc/php/php.ini | |
echo 'mbstring.func_overload=2' >> /opt/docker/etc/php/php.ini | |
cat /opt/docker/etc/php/php.ini | |
- name: Install Bitrix CI | |
run: composer require bitrix-toolkit/bitrix-ci:${{ matrix.Bitrix }} --dev --no-ansi --no-interaction --no-progress --prefer-dist | |
- name: Install dependencies | |
run: composer install --no-ansi --no-interaction --no-progress --prefer-dist | |
- name: Run PHPUnit tests | |
run: XDEBUG_MODE=coverage vendor/bin/phpunit --whitelist src/ --coverage-text --coverage-clover clover.xml | |
- name: Upload coverage to https://scrutinizer-ci.com | |
if: matrix.PHP == '7.4' && matrix.Bitrix == '21.400' | |
continue-on-error: true | |
run: | | |
wget -nv https://scrutinizer-ci.com/ocular.phar | |
php ocular.phar code-coverage:upload --format=php-clover clover.xml |