Update phpstan.neon #13
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: "PHPUnit" | |
on: | |
push: | |
branches: [ "dev" ] | |
pull_request: | |
branches: [ "pre", "pro"] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.0] | |
name: Unit Tests - PHP ${{ matrix.php }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Cache PHP dependencies | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.ci', '.env');" | |
- name: Remove vendor | |
run: rm -rf vendor | |
- name: Remove composer file | |
run: rm composer.lock | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Cache Clear | |
run: | | |
php artisan cache:clear | |
php artisan clear-compiled | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Create Database | |
run: | | |
mkdir -p database | |
touch database/database.sqlite | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
env: | |
DB_CONNECTION: sqlite | |
DB_DATABASE: database/database.sqlite | |
run: vendor/bin/phpunit --verbose | |