liberu-genealogy / genealogy-laravel

Full genealogy application using Laravel 11, PHP 8.3, Filament 3.2 and Livewire 3.5
https://www.liberu.co.uk
MIT License
104 stars 58 forks source link

Sweep: update install.yml github workflow for testing the project which uses php 8.3 and node 20. Needs to checkout code, copy env testing, composer install, php artisan key:generate, php artisan migrate, php artisan migrate - - seed, and run then npm install and npm run build #750

Closed curtisdelicata closed 4 weeks ago

sweep-ai[bot] commented 4 weeks ago

🚀 Here's the PR! #762

💎 Sweep Pro: You have unlimited Sweep issues

Actions

Step 1: 🔎 Searching

(Click to expand) Here are the code search results. I'm now analyzing these search results to write the PR. https://github.com/liberu-genealogy/genealogy-laravel/blob/58a4ef718e5eb1bd0a18a6ae3c09b71076dc0005/composer.json#L1-L75 https://github.com/liberu-genealogy/genealogy-laravel/blob/58a4ef718e5eb1bd0a18a6ae3c09b71076dc0005/phpunit.xml#L1-L33

Step 2: ⌨️ Coding

I'm going to follow the following steps to help you solve the GitHub issue:

  1. Update the install.yml GitHub workflow file to use PHP 8.3.
  2. Update the install.yml GitHub workflow file to use Node.js 20.
  3. Add a step to the install.yml GitHub workflow to check out the project code.
  4. Add a step to the install.yml GitHub workflow to copy the .env.testing file to .env.
  5. Add a step to the install.yml GitHub workflow to run composer install.
  6. Add a step to the install.yml GitHub workflow to run php artisan key:generate.
  7. Add a step to the install.yml GitHub workflow to run database migrations with php artisan migrate.
  8. Add a step to the install.yml GitHub workflow to seed the database with php artisan db:seed.
  9. Add a step to the install.yml GitHub workflow to run npm install.
  10. Add a step to the install.yml GitHub workflow to run npm run build.

Here are the changes we decided to make. I'm done making edits and now I'm just validating the changes using a linter to catch any mistakes like syntax errors or undefined variables:

.github/workflows/install.yml

Update the install.yml GitHub workflow file to use PHP 8.3 and Node.js 20, check out the code, copy the testing environment file, install dependencies with Composer and npm, generate an application key, run database migrations and seeding, and build the frontend assets.
name: Install

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

jobs:

  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '8.3'

    - name: Setup Node.js
      uses: actions/setup-node@v3
      with:
        node-version: '20'

    - name: Copy environment file
      run: cp .env.testing .env

    - name: Install dependencies
      run: composer install

    - name: Generate application key
      run: php artisan key:generate

    - name: Run database migrations
      run: php artisan migrate

    - name: Seed database
      run: php artisan db:seed

    - name: Install npm dependencies
      run: npm install

    - name: Build frontend assets
      run: npm run build

    - name: Run tests
      run: php artisan test

Step 3: 🔄️ Validating

Your changes have been successfully made to the branch sweep/update_installyml_github_workflow_for_te. I have validated these changes using a syntax checker and a linter.


[!TIP] To recreate the pull request, edit the issue title or description.

This is an automated message generated by Sweep AI.