testing #359
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
name: testing | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 2 * * *' | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
PROJECT_NAME: laravel | |
jobs: | |
testing: | |
name: Testing on PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php: ['8.1', '8.2', '8.3'] | |
laravel: [10, 11] | |
exclude: | |
- php: 8.1 | |
laravel: 11 | |
max-parallel: 36 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: redis, pdo, pdo_mysql, bcmath | |
tools: phpize | |
coverage: none | |
- name: Setup Redis | |
run: | | |
docker run -d -p 6379:6379 redis | |
- name: Setup Laravel Project | |
run: | | |
composer create-project --prefer-dist laravel/laravel ${PROJECT_NAME} ^${{ matrix.laravel }} --stability=dev | |
- name: Install Horizon Component | |
run: | | |
cd ${PROJECT_NAME} | |
composer require laravel/horizon | |
php artisan horizon:install | |
- name: Install Horizon Restart Component | |
run: | | |
cd ${PROJECT_NAME} | |
composer config minimum-stability dev | |
composer config repositories.laravel-horizon-restart path ../ | |
composer require huangdijia/laravel-horizon-restart | |
- name: Booting Horizon | |
run: | | |
cd ${PROJECT_NAME} | |
php artisan horizon > /tmp/horizon.log & | |
sleep 3 | |
- name: Checking Horizon(running) | |
run: | | |
cd ${PROJECT_NAME} | |
php artisan horizon:list | |
- name: Restart Horizon | |
run: | | |
cd ${PROJECT_NAME} | |
php artisan horizon:restart | |
sleep 3 | |
- name: Checking Horizon(terminated) | |
run: | | |
cd ${PROJECT_NAME} | |
php artisan horizon:list | |
cat /tmp/horizon.log |