@@ -5,6 +5,7 @@ on: [push, pull_request]
55env :
66 DEFAULT_COMPOSER_FLAGS : " --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
77 PHPUNIT_EXCLUDE_GROUP : mssql,oci,wincache,xcache,zenddata,cubrid
8+ XDEBUG_MODE : coverage, develop
89
910jobs :
1011 phpunit :
@@ -28,88 +29,47 @@ jobs:
2829 ports :
2930 - 5432:5432
3031 options : --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
31- mssql :
32- image : mcr.microsoft.com/mssql/server:2017-latest
33- env :
34- SA_PASSWORD : YourStrong!Passw0rd
35- ACCEPT_EULA : Y
36- MSSQL_PID : Developer
37- ports :
38- - 1433:1433
39- options : --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3
4032 strategy :
4133 fail-fast : false
4234 matrix :
4335 os : [ubuntu-latest]
44- php : [' 5.4', ' 5.5', ' 5.6', ' 7.0', ' 7.1', ' 7.2', ' 7.3', ' 7.4', ' 8.0' ]
36+ php : [5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1 ]
4537
4638 steps :
4739 - name : Generate french locale
4840 run : sudo locale-gen fr_FR.UTF-8
49- - name : Create MS SQL Database
50- run : docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'
5141 - name : Checkout
52- uses : actions/checkout@v2
42+ uses : actions/checkout@v3
5343 - name : Install PHP
5444 uses : shivammathur/setup-php@v2
5545 with :
5646 php-version : ${{ matrix.php }}
5747 tools : pecl
5848 extensions : apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached, mysql, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, sqlite
5949 ini-values : date.timezone='UTC', session.save_path="${{ runner.temp }}"
60- - name : Install php-sqlsrv
61- run : |
62- curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - >/dev/null 2>&1
63- curl -sSL https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/mssql-server-2017.list >/dev/null 2>&1
64- printf "\033[32;1m✓ \033[0m\033[90;1madd microsoft keys & repository\n"
65- sudo apt-get -q update >/dev/null 2>&1
66- printf "\033[32;1m✓ \033[0m\033[90;1mapt-get update\n"
67- sudo pecl -q install pdo_sqlsrv > /dev/null 2>&1
68- printf "\033[32;1m✓ \033[0m\033[90;1mpecl install pdo_sqlsrv\n"
69- if (php -m | grep -i -q -w "pdo_sqlsrv"); then
70- printf "\033[32;1mpdo_sqlsrv installed correct\n"
71- else
72- printf "\033[31;1mpdo_sqlsrv not installed :-(\n"
73- fi
74- if : matrix.php == '7.4' || matrix.php == '7.3' || matrix.php == '7.2'
7550 - name : Install Memcached
7651 uses : niden/actions-memcached@v7
7752 - name : Get composer cache directory
7853 id : composer-cache
7954 run : echo "::set-output name=dir::$(composer config cache-files-dir)"
8055 - name : Cache composer dependencies
81- uses : actions/cache@v1
56+ uses : actions/cache@v3
8257 with :
8358 path : ${{ steps.composer-cache.outputs.dir }}
8459 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
8560 restore-keys : ${{ runner.os }}-composer-
8661 - name : Install dependencies
8762 run : composer update $DEFAULT_COMPOSER_FLAGS
88- - name : PHP Unit tests for PHP 7.1
89- run : vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group oci,wincache,xcache,zenddata,cubrid --colors=always
90- if : matrix.php == '7.1'
91- - name : PHP Unit tests for PHP >= 7.2
92- run : vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
93- env :
94- PHPUNIT_EXCLUDE_GROUP : oci,wincache,xcache,zenddata,cubrid
95- if : matrix.php >= '7.2'
96- - name : PHP Unit tests for PHP <= 7.0
63+ - name : PHP Unit tests
9764 run : vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
98- if : matrix.php <= '7.0'
99- - name : Code coverage
100- run : |
101- wget https://scrutinizer-ci.com/ocular.phar
102- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
103- if : matrix.php == '7.1'
104- continue-on-error : true # if is fork
10565
10666 npm :
10767 name : NPM 6 on ubuntu-latest
10868 runs-on : ubuntu-latest
10969
11070 steps :
11171 - name : Checkout
112- uses : actions/checkout@v2
72+ uses : actions/checkout@v3
11373 - name : Install PHP
11474 uses : shivammathur/setup-php@v2
11575 with :
11979 id : composer-cache
12080 run : echo "::set-output name=dir::$(composer config cache-files-dir)"
12181 - name : Cache composer dependencies
122- uses : actions/cache@v1
82+ uses : actions/cache@v3
12383 with :
12484 path : ${{ steps.composer-cache.outputs.dir }}
12585 key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
0 commit comments