Add UINT_SET
attribute type support + Fix tests and CI
#124
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
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
name: build | |
jobs: | |
tests: | |
name: PHP ${{ matrix.php }}-sphinx-${{ matrix.sphinx }}-${{ matrix.os }} | |
env: | |
extensions: pdo, pdo_mysql | |
key: cache-v1 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-20.04 | |
php: | |
- "5.4" | |
- "5.5" | |
- "5.6" | |
- "7.0" | |
- "7.1" | |
- "7.2" | |
- "7.3" | |
- "7.4" | |
sphinx: | |
- "2.2.11" | |
- "3.5.1" | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: yiitest | |
ports: | |
- 3306:3306 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: ${{ env.extensions }} | |
ini-values: date.timezone='UTC' | |
coverage: pcov | |
tools: composer:v2 | |
- name: Update composer | |
run: composer self-update | |
- name: Install dependencies with composer php < 8.0 | |
if: matrix.php != '8.0' | |
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | |
- name: Install dependencies with composer php 8.0 | |
if: matrix.php == '8.0' | |
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | |
- name: Install sphinx | |
run: sh tests/data/actions/sphinx-setup-${{ matrix.sphinx }}.sh | |
- name: Setup source database | |
run: | | |
mysql -h127.0.0.1 -D yiitest -uroot -proot < tests/data/source.sql | |
- name: Run sphinx 2.2.11 | |
if: matrix.sphinx == '2.2.11' | |
run: | | |
indexer --config tests/data/sphinx-${{ matrix.sphinx }}.conf --all | |
searchd --config tests/data/sphinx-${{ matrix.sphinx }}.conf | |
- name: Run sphinx 3 | |
if: matrix.sphinx != '2.2.11' | |
run: | | |
/opt/sphinx/sphinx-${{ matrix.sphinx }}/bin/indexer --config tests/data/sphinx-${{ matrix.sphinx }}.conf --all | |
/opt/sphinx/sphinx-${{ matrix.sphinx }}/bin/searchd --config tests/data/sphinx-${{ matrix.sphinx }}.conf | |
- name: Run tests with phpunit | |
if: matrix.php != '7.4' | |
run: vendor/bin/phpunit --colors=always | |
- name: Run tests with phpunit | |
if: matrix.php == '7.4' | |
run: vendor/bin/phpunit --coverage-clover=clover.xml --colors=always | |
- name: Upload code coverage scrutinizer | |
if: matrix.php == '7.4' | |
run: | | |
wget https://scrutinizer-ci.com/ocular.phar | |
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |