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

Информация по запуску тестов. #102

Информация по запуску тестов.

Информация по запуску тестов. #102

Workflow file for this run

name: PHPUnit
on: [push]
jobs:
PHPUnit:
runs-on: ubuntu-latest
strategy:
matrix:
PHP: ["7.3", "7.4", "8.0", "8.1", "8.2"]
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" }
container:
image: webdevops/php-dev:${{ matrix.PHP }}
env:
MYSQL_HOST: mysql
MYSQL_DATABASE: bitrix
MYSQL_USER: bitrix
MYSQL_PASSWORD: bitrix
ELASTICSEARCH_HOSTS: http://elasticsearch:9200
services:
elasticsearch:
image: elasticsearch:7.17.9
env:
discovery.type: single-node
options: >-
--health-cmd="curl http://localhost:9200/_cluster/health"
--health-interval=10s
--health-timeout=5s
--health-retries=6
mysql:
image: mysql:5.7
env:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: bitrix
MYSQL_USER: bitrix
MYSQL_PASSWORD: bitrix
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=6
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-elastic-indexer/bitrix-elastic-indexer
- 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
echo 'max_input_vars=10000' >> /opt/docker/etc/php/php.ini
echo 'date.timezone=Europe/Moscow' >> /opt/docker/etc/php/php.ini
cat /opt/docker/etc/php/php.ini
- name: Install dependencies
run: composer install --no-ansi --no-interaction --no-suggest --no-progress --prefer-dist
- name: Install Bitrix CI
run: composer require sheerockoff/bitrix-ci:${{ matrix.Bitrix }} --dev --no-ansi --no-interaction --no-suggest --no-progress --prefer-dist
- name: Run PHPUnit tests
run: XDEBUG_MODE=coverage vendor/bin/phpunit --whitelist src/ --coverage-text --coverage-clover clover.xml
- name: Push data to https://scrutinizer-ci.com
if: matrix.PHP == '7.4' && matrix.Bitrix == '21.400'
run: |
wget -nv https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover clover.xml