mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Update and refactor example workflows
This commit is contained in:
parent
aa1efabe45
commit
7117491f1a
@ -835,6 +835,7 @@ Examples of using `setup-php` with various PHP Frameworks and Packages.
|
|||||||
|CakePHP with `PostgreSQL` and `Redis`|`ubuntu`|[cakephp-postgres.yml](./examples/cakephp-postgres.yml "GitHub Action for CakePHP with Postgres and Redis")|
|
|CakePHP with `PostgreSQL` and `Redis`|`ubuntu`|[cakephp-postgres.yml](./examples/cakephp-postgres.yml "GitHub Action for CakePHP with Postgres and Redis")|
|
||||||
|CakePHP without services|`macOS`, `ubuntu` and `windows`|[cakephp.yml](./examples/cakephp.yml "GitHub Action for CakePHP without services")|
|
|CakePHP without services|`macOS`, `ubuntu` and `windows`|[cakephp.yml](./examples/cakephp.yml "GitHub Action for CakePHP without services")|
|
||||||
|CodeIgniter|`macOS`, `ubuntu` and `windows`|[codeigniter.yml](./examples/codeigniter.yml "GitHub Action for CodeIgniter")|
|
|CodeIgniter|`macOS`, `ubuntu` and `windows`|[codeigniter.yml](./examples/codeigniter.yml "GitHub Action for CodeIgniter")|
|
||||||
|
|Laminas MVC|`macOS`, `ubuntu` and `windows`|[laminas-mvc.yml](./examples/laminas-mvc.yml "GitHub Action for Laminas Framework MVC Projects")|
|
||||||
|Laravel with `MySQL` and `Redis`|`ubuntu`|[laravel-mysql.yml](./examples/laravel-mysql.yml "GitHub Action for Laravel with MySQL and Redis")|
|
|Laravel with `MySQL` and `Redis`|`ubuntu`|[laravel-mysql.yml](./examples/laravel-mysql.yml "GitHub Action for Laravel with MySQL and Redis")|
|
||||||
|Laravel with `PostgreSQL` and `Redis`|`ubuntu`|[laravel-postgres.yml](./examples/laravel-postgres.yml "GitHub Action for Laravel with PostgreSQL and Redis")|
|
|Laravel with `PostgreSQL` and `Redis`|`ubuntu`|[laravel-postgres.yml](./examples/laravel-postgres.yml "GitHub Action for Laravel with PostgreSQL and Redis")|
|
||||||
|Laravel without services|`macOS`, `ubuntu` and `windows`|[laravel.yml](./examples/laravel.yml "GitHub Action for Laravel without services")|
|
|Laravel without services|`macOS`, `ubuntu` and `windows`|[laravel.yml](./examples/laravel.yml "GitHub Action for Laravel without services")|
|
||||||
@ -851,7 +852,6 @@ Examples of using `setup-php` with various PHP Frameworks and Packages.
|
|||||||
|Symfony without services|`macOS`, `ubuntu` and `windows`|[symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services")|
|
|Symfony without services|`macOS`, `ubuntu` and `windows`|[symfony.yml](./examples/symfony.yml "GitHub Action for Symfony without services")|
|
||||||
|Yii2 Starter Kit with `MySQL`|`ubuntu`|[yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL")|
|
|Yii2 Starter Kit with `MySQL`|`ubuntu`|[yii2-mysql.yml](./examples/yii2-mysql.yml "GitHub Action for Yii2 Starter Kit with MySQL")|
|
||||||
|Yii2 Starter Kit with `PostgreSQL`|`ubuntu`|[yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL")|
|
|Yii2 Starter Kit with `PostgreSQL`|`ubuntu`|[yii2-postgres.yml](./examples/yii2-postgres.yml "GitHub Action for Yii2 Starter Kit with PostgreSQL")|
|
||||||
|Zend Framework|`macOS`, `ubuntu` and `windows`|[zend-framework.yml](./examples/zend-framework.yml "GitHub Action for Zend Framework")|
|
|
||||||
|
|
||||||
## :bookmark: Versioning
|
## :bookmark: Versioning
|
||||||
|
|
||||||
|
@ -8,17 +8,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.1', '7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.composer-cache.outputs.dir }}
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||||||
@ -26,7 +30,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: PHP test
|
- name: PHP test
|
||||||
run: composer test
|
run: composer test
|
@ -15,17 +15,22 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
# blackfire-player supports PHP >= 5.5
|
# blackfire-player supports PHP >= 5.5
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: blackfire
|
extensions: blackfire
|
||||||
tools: blackfire, blackfire-player #Setup Blackfire client, agent and player
|
# Setup Blackfire CLI and player
|
||||||
|
tools: blackfire, blackfire-player
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
|
# Refer to https://blackfire.io/docs/player/index#usage
|
||||||
- name: Play the scenario
|
- name: Play the scenario
|
||||||
run: blackfire-player run scenario.bkf # Refer to https://blackfire.io/docs/player/index#usage
|
run: blackfire-player run scenario.bkf
|
||||||
|
@ -15,17 +15,23 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
# Blackfire supports PHP >= 5.3 on ubuntu and macos and PHP >= 5.4 on windows
|
# Blackfire supports PHP >= 5.3 on Ubuntu and macOS, and PHP >= 5.4 on Windows
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
|
# Setup Blackfire extension and CLI
|
||||||
extensions: blackfire
|
extensions: blackfire
|
||||||
tools: blackfire #Setup Blackfire cli
|
tools: blackfire
|
||||||
|
# Disable Xdebug and PCOV coverage drivers
|
||||||
coverage: none
|
coverage: none
|
||||||
|
|
||||||
|
# Refer to https://blackfire.io/docs/cookbooks/profiling-cli
|
||||||
- name: Profile
|
- name: Profile
|
||||||
run: blackfire run php my-script.php # Refer to https://blackfire.io/docs/cookbooks/profiling-cli
|
run: blackfire run php my-script.php
|
||||||
|
@ -6,11 +6,11 @@ jobs:
|
|||||||
tests:
|
tests:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
@ -18,6 +18,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 3306/tcp
|
- 3306/tcp
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -26,6 +27,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
@ -34,11 +37,14 @@ jobs:
|
|||||||
# Install memcached if using ext-memcached
|
# Install memcached if using ext-memcached
|
||||||
extensions: mbstring, intl, redis, pdo_mysql
|
extensions: mbstring, intl, redis, pdo_mysql
|
||||||
coverage: pcov
|
coverage: pcov
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -47,10 +53,12 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer run-script post-install-cmd --no-interaction
|
composer run-script post-install-cmd --no-interaction
|
||||||
|
|
||||||
# Add a step to run migrations if required
|
# Add a step to run migrations if required
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@ -64,14 +72,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -80,8 +92,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: PHP CodeSniffer
|
- name: PHP CodeSniffer
|
||||||
run: composer cs-check
|
run: composer cs-check
|
||||||
|
|
||||||
@ -91,15 +105,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
tools: phpstan
|
tools: phpstan
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -108,7 +126,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Static Analysis using PHPStan
|
- name: Static Analysis using PHPStan
|
||||||
run: phpstan analyse --no-progress src/
|
run: phpstan analyse --no-progress src/
|
@ -6,11 +6,11 @@ jobs:
|
|||||||
tests:
|
tests:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -18,6 +18,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432/tcp
|
- 5432/tcp
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -26,6 +27,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
@ -34,9 +37,11 @@ jobs:
|
|||||||
# Install memcached if using ext-memcached
|
# Install memcached if using ext-memcached
|
||||||
extensions: mbstring, intl, redis, pdo_pgsql
|
extensions: mbstring, intl, redis, pdo_pgsql
|
||||||
coverage: pcov
|
coverage: pcov
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -45,10 +50,12 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer run-script post-install-cmd --no-interaction
|
composer run-script post-install-cmd --no-interaction
|
||||||
|
|
||||||
# Add a step to run migrations if required
|
# Add a step to run migrations if required
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
@ -62,14 +69,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -78,8 +89,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: PHP CodeSniffer
|
- name: PHP CodeSniffer
|
||||||
run: composer cs-check
|
run: composer cs-check
|
||||||
|
|
||||||
@ -89,15 +102,18 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
tools: phpstan
|
tools: phpstan
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -106,7 +122,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Static Analysis using PHPStan
|
- name: Static Analysis using PHPStan
|
||||||
run: phpstan analyse --no-progress src/
|
run: phpstan analyse --no-progress src/
|
@ -7,20 +7,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
|
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
|
||||||
coverage: pcov #optional
|
coverage: pcov
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -29,10 +33,12 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer run-script post-install-cmd --no-interaction
|
composer run-script post-install-cmd --no-interaction
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
|
|
||||||
@ -42,14 +48,17 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -58,8 +67,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: PHP CodeSniffer
|
- name: PHP CodeSniffer
|
||||||
run: composer cs-check
|
run: composer cs-check
|
||||||
|
|
||||||
@ -69,15 +80,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
- name: Setup PHP
|
- name: Setup PHP
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: '7.3'
|
php-version: '8.1'
|
||||||
extensions: mbstring, intl
|
extensions: mbstring, intl
|
||||||
tools: phpstan
|
tools: phpstan
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -86,7 +101,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Static Analysis using PHPStan
|
- name: Static Analysis using PHPStan
|
||||||
run: phpstan analyse --no-progress src/
|
run: phpstan analyse --no-progress src/
|
||||||
|
@ -6,20 +6,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, intl, curl, dom
|
extensions: mbstring, intl, curl, dom
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -28,7 +32,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
@ -1,4 +1,4 @@
|
|||||||
# GitHub Action for Zend Framework
|
# GitHub Action for Laminas framework MVC projects
|
||||||
name: Testing Zend Framework
|
name: Testing Zend Framework
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
@ -6,20 +6,23 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, bcmath, curl, intl
|
coverage: xdebug
|
||||||
coverage: xdebug #optional
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -28,9 +31,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
|
||||||
composer require --dev phpunit/phpunit squizlabs/php_codesniffer zendframework/zend-test
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
@ -15,7 +15,7 @@ jobs:
|
|||||||
SESSION_DRIVER: redis
|
SESSION_DRIVER: redis
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
@ -23,6 +23,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 3306/tcp
|
- 3306/tcp
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -31,21 +32,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo, mysql
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -54,19 +60,24 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: |
|
run: |
|
||||||
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
php artisan key:generate
|
php artisan key:generate
|
||||||
|
|
||||||
- name: Clear Config
|
- name: Clear Config
|
||||||
run: php artisan config:clear
|
run: php artisan config:clear
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: php artisan migrate -v
|
run: php artisan migrate -v
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
env:
|
env:
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
DB_DATABASE: postgres
|
DB_DATABASE: postgres
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -25,6 +25,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432/tcp
|
- 5432/tcp
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -33,19 +34,23 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo, pgsql
|
extensions: mbstring, dom, fileinfo, pgsql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -54,19 +59,24 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: |
|
run: |
|
||||||
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
php artisan key:generate
|
php artisan key:generate
|
||||||
|
|
||||||
- name: Clear Config
|
- name: Clear Config
|
||||||
run: php artisan config:clear
|
run: php artisan config:clear
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: php artisan migrate -v
|
run: php artisan migrate -v
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
env:
|
env:
|
||||||
|
@ -9,19 +9,23 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo
|
extensions: mbstring, dom, fileinfo
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -30,13 +34,17 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: |
|
run: |
|
||||||
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
php artisan key:generate
|
php artisan key:generate
|
||||||
|
|
||||||
- name: Clear Config
|
- name: Clear Config
|
||||||
run: php artisan config:clear
|
run: php artisan config:clear
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
@ -15,7 +15,7 @@ jobs:
|
|||||||
SESSION_DRIVER: redis
|
SESSION_DRIVER: redis
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
@ -23,6 +23,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 3306/tcp
|
- 3306/tcp
|
||||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -31,21 +32,26 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo, mysql
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -54,19 +60,24 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer require predis/predis illuminate/redis
|
composer require predis/predis illuminate/redis
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
- name: Register Redis as service provider
|
- name: Register Redis as service provider
|
||||||
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: php artisan migrate -v
|
run: php artisan migrate -v
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
env:
|
env:
|
||||||
|
@ -17,7 +17,7 @@ jobs:
|
|||||||
DB_DATABASE: postgres
|
DB_DATABASE: postgres
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -25,6 +25,7 @@ jobs:
|
|||||||
ports:
|
ports:
|
||||||
- 5432/tcp
|
- 5432/tcp
|
||||||
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis
|
image: redis
|
||||||
ports:
|
ports:
|
||||||
@ -33,19 +34,23 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo, pgsql
|
extensions: mbstring, dom, fileinfo, pgsql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -54,19 +59,24 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: |
|
run: |
|
||||||
composer install --no-progress --prefer-dist --optimize-autoloader
|
composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
composer require predis/predis illuminate/redis
|
composer require predis/predis illuminate/redis
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
- name: Register Redis as service provider
|
- name: Register Redis as service provider
|
||||||
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: php artisan migrate -v
|
run: php artisan migrate -v
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
DB_PORT: ${{ job.services.postgres.ports[5432] }}
|
||||||
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
||||||
env:
|
env:
|
||||||
|
@ -9,19 +9,23 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, fileinfo, mysql
|
extensions: mbstring, dom, fileinfo, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -30,9 +34,12 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
@ -18,7 +18,7 @@ jobs:
|
|||||||
CODECEPTION_PORT: 8888
|
CODECEPTION_PORT: 8888
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: password
|
MYSQL_ROOT_PASSWORD: password
|
||||||
@ -35,17 +35,23 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x.
|
# Use phalcon3 for the phalcon 3.x.
|
||||||
coverage: xdebug #optional
|
extensions: mbstring, dom, zip, phalcon4, mysql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -54,10 +60,13 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: |
|
run: |
|
||||||
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
|
||||||
@ -65,6 +74,7 @@ jobs:
|
|||||||
vendor/bin/phinx seed:run
|
vendor/bin/phinx seed:run
|
||||||
env:
|
env:
|
||||||
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
|
||||||
|
@ -19,7 +19,7 @@ jobs:
|
|||||||
DB_CONNECTION: pgsql
|
DB_CONNECTION: pgsql
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -36,12 +36,16 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x
|
# Use phalcon3 for the phalcon 3.x
|
||||||
coverage: xdebug #optional
|
extensions: mbstring, dom, zip, phalcon4, pgsql
|
||||||
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
@ -8,33 +8,41 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.1', '7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
node-versions: ['8', '10']
|
node-versions: [16']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Setup Node.js
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-versions }}
|
node-version: ${{ matrix.node-versions }}
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring
|
extensions: mbstring
|
||||||
|
|
||||||
- name: Check node versions
|
- name: Check node versions
|
||||||
run: node -v
|
run: node -v
|
||||||
|
|
||||||
- name: Get yarn cache
|
- name: Get yarn cache
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-yarn-
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -43,15 +51,19 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install yarn dependencies
|
- name: Install yarn dependencies
|
||||||
run: yarn -V
|
run: yarn -V
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Yarn test and build
|
- name: Yarn test and build
|
||||||
run: |
|
run: |
|
||||||
yarn run test
|
yarn run test
|
||||||
yarn run build
|
yarn run build
|
||||||
yarn run rmdist
|
yarn run rmdist
|
||||||
yarn run "build:production"
|
yarn run "build:production"
|
||||||
|
|
||||||
- name: PHP test
|
- name: PHP test
|
||||||
run: composer test
|
run: composer test
|
@ -6,20 +6,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
runs-on: ${{ matrix.operating-system }}
|
runs-on: ${{ matrix.operating-system }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, simplexml, dom
|
extensions: mbstring, simplexml, dom
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -28,7 +32,9 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Test with phpunit
|
- name: Test with phpunit
|
||||||
run: vendor/bin/phpunit --coverage-text
|
run: vendor/bin/phpunit --coverage-text
|
@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: symfony
|
MYSQL_ROOT_PASSWORD: symfony
|
||||||
@ -18,22 +18,27 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
tools: phpunit-bridge
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -42,8 +47,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: |
|
run: |
|
||||||
composer require --dev symfony/orm-pack
|
composer require --dev symfony/orm-pack
|
||||||
@ -51,7 +58,9 @@ jobs:
|
|||||||
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
|
||||||
|
|
||||||
- name: Install PHPUnit
|
- name: Install PHPUnit
|
||||||
run: simple-phpunit install
|
run: simple-phpunit install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: simple-phpunit --coverage-text
|
run: simple-phpunit --coverage-text
|
||||||
|
@ -7,7 +7,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -18,20 +18,24 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
tools: phpunit-bridge
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -40,8 +44,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Run Migration
|
- name: Run Migration
|
||||||
run: |
|
run: |
|
||||||
composer require --dev symfony/orm-pack
|
composer require --dev symfony/orm-pack
|
||||||
@ -49,7 +55,9 @@ jobs:
|
|||||||
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
|
||||||
env:
|
env:
|
||||||
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
|
||||||
|
|
||||||
- name: Install PHPUnit
|
- name: Install PHPUnit
|
||||||
run: simple-phpunit install
|
run: simple-phpunit install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: simple-phpunit --coverage-text
|
run: simple-phpunit --coverage-text
|
||||||
|
@ -9,20 +9,24 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
php-versions: ['7.3', '7.4']
|
php-versions: ['7.4', '8.0', '8.1']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
tools: phpunit-bridge
|
tools: phpunit-bridge
|
||||||
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -31,9 +35,12 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Install PHPUnit
|
- name: Install PHPUnit
|
||||||
run: simple-phpunit install
|
run: simple-phpunit install
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: simple-phpunit --coverage-text
|
run: simple-phpunit --coverage-text
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
DB_CHARSET: utf8
|
DB_CHARSET: utf8
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:5.7
|
image: mysql:latest
|
||||||
env:
|
env:
|
||||||
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
MYSQL_ROOT_PASSWORD: yii
|
MYSQL_ROOT_PASSWORD: yii
|
||||||
@ -24,25 +24,31 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set Node.js 10.x
|
- name: Set Node.js 10.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 10.x
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, intl, gd, imagick, zip, dom, mysql
|
extensions: mbstring, intl, gd, imagick, zip, dom, mysql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Start mysql service
|
- name: Start mysql service
|
||||||
run: sudo systemctl start mysql
|
run: sudo systemctl start mysql
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -51,8 +57,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: |
|
run: |
|
||||||
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
||||||
@ -62,6 +70,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
vendor/bin/codecept build
|
vendor/bin/codecept build
|
||||||
|
@ -13,7 +13,7 @@ jobs:
|
|||||||
DB_CHARSET: utf8
|
DB_CHARSET: utf8
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:10.8
|
image: postgres:latest
|
||||||
env:
|
env:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
@ -24,23 +24,28 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
php-versions: ['7.2', '7.3', '7.4']
|
php-versions: ['7.4', '8.0']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set Node.js 10.x
|
- name: Set Node.js 10.x
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 10.x
|
||||||
- name: Setup PHP, with composer and extensions
|
|
||||||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
|
# Docs: https://github.com/shivammathur/setup-php
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
|
extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
|
||||||
coverage: xdebug #optional
|
coverage: xdebug
|
||||||
|
|
||||||
- name: Get composer cache directory
|
- name: Get composer cache directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
- name: Cache composer dependencies
|
- name: Cache composer dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
@ -49,8 +54,10 @@ jobs:
|
|||||||
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
|
||||||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
- name: Install Composer dependencies
|
- name: Install Composer dependencies
|
||||||
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
||||||
|
|
||||||
- name: Prepare the application
|
- name: Prepare the application
|
||||||
run: |
|
run: |
|
||||||
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
php -r "file_exists('.env') || copy('.env.dist', '.env');"
|
||||||
@ -60,6 +67,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
vendor/bin/codecept build
|
vendor/bin/codecept build
|
||||||
|
Loading…
Reference in New Issue
Block a user