Skip to content

Add UINT_SET attribute type support + Fix tests and CI #87

Add UINT_SET attribute type support + Fix tests and CI

Add UINT_SET attribute type support + Fix tests and CI #87

Workflow file for this run

on:
pull_request:
push:
branches:
- master
name: build
jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
extensions: pdo, pdo_mysql
key: cache-v1
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
php:
- "7.2"
sphinx:
- "3.5.1"
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: |
sudo systemctl start mysql.service
mysql -uroot -proot -e 'ALTER USER "root"@"localhost" IDENTIFIED WITH mysql_native_password BY "root";FLUSH PRIVILEGES;'
mysql -uroot -proot -e 'CREATE DATABASE `yiitest`;'
mysql -D yiitest -uroot -proot < tests/data/source.sql
- name: Run sphinx
run: |
indexer --config tests/data/sphinx-${{ matrix.sphinx }}.conf --all
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