From 2f4319d0680814b876d6f1768a202e7646249954 Mon Sep 17 00:00:00 2001 From: Roberto Butti Date: Sun, 10 Mar 2024 16:45:18 +0100 Subject: [PATCH] Update laravel.yml Updating Laravel Workflow: - Updating PHP version - Updating setup-php actions - Updating checkout actions - Using migration - using artisan test for a better management of executing tests (phpunit/pestphp) --- ci/laravel.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ci/laravel.yml b/ci/laravel.yml index fc30f21321..23be55d335 100644 --- a/ci/laravel.yml +++ b/ci/laravel.yml @@ -12,10 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e + - uses: shivammathur/setup-php@v2 with: - php-version: '8.0' - - uses: actions/checkout@v3 + php-version: '8.3' + - uses: actions/checkout@v4 - name: Copy .env run: php -r "file_exists('.env') || copy('.env.example', '.env');" - name: Install Dependencies @@ -24,12 +24,14 @@ jobs: run: php artisan key:generate - name: Directory Permissions run: chmod -R 777 storage bootstrap/cache - - name: Create Database + - name: Execute migrations + env: + DB_CONNECTION: sqlite run: | mkdir -p database touch database/database.sqlite - - name: Execute tests (Unit and Feature tests) via PHPUnit/Pest + php artisan migrate + - name: Execute tests (Unit and Feature tests) via PHPUnit env: DB_CONNECTION: sqlite - DB_DATABASE: database/database.sqlite run: php artisan test