add pdo_sqlite and fail operator #4
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: Pipeline | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
ci: | |
name: Laravel (PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}) | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
operating-system: [ubuntu-latest, windows-latest, macos-latest] | |
php-versions: ['8.1', '8.2', '8.3'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, dom, fileinfo, pdo_sqlite | |
- name: Install Composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader || composer update --no-progress --prefer-dist --optimize-autoloader | |
- name: Prepare the application | |
run: | | |
php -r "file_exists('.env') || copy('.env.example', '.env');" | |
php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Clear Config | |
run: php artisan config:clear | |
- name: Create Database | |
run: touch database/database.sqlite | |
- name: Migrate Database | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: php artisan migrate | |
- name: Test with phpunit | |
run: vendor/bin/phpunit --testdox |