Improve code and examples

This commit is contained in:
Shivam Mathur
2019-10-08 18:12:54 +05:30
parent 7e81c058fb
commit 46a875ad7e
31 changed files with 1049 additions and 589 deletions

View File

@ -2,7 +2,7 @@ name: Testing Laravel with PostgreSQL
on: [push, pull_request]
jobs:
laravel:
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }})
name: Laravel (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
env:
BROADCAST_DRIVER: log
@ -31,10 +31,9 @@ jobs:
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
max-parallel: 15
max-parallel: 3
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
php-versions: ['7.2', '7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v1
@ -42,17 +41,21 @@ jobs:
uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring #optional
extension-csv: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional
- name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Prepare the application
run: |
cp .env.example .env
php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate
- name: Clear Config
run: php artisan config:clear
- name: Run Migration
run: php artisan migrate -v
env:
DB_PORT: ${{ job.services.postgres.ports[5432] }}
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
env:
DB_PORT: ${{ job.services.postgres.ports[5432] }}