Sammyjo20 / lasso

🐎 Lasso is a Laravel package created to make your deployments blazing fast.
MIT License
341 stars 16 forks source link

Database connection error during Github CI/CD #52

Closed 77media-creations closed 2 years ago

77media-creations commented 2 years ago

Hello there,

I tried to compile assets during Github CI/CD. All my php unit tests run successfully but when it comes to compiling the assets using php artisan lasso:publish , it fails, see the error screenshot below.

It works on my localhost and successfully uploads the assets.

Looks like it cannot connect to the database, however php unit tests are passed in the same workflow and they do connect to the database.

Here is the part of workflow to lasso publish:

    - name: Compile & upload assets
        if: ${{ github.ref == 'refs/heads/production' && github.event_name == 'push' }}
        env:
          DROPBOX_TOKEN: ${{ secrets.DROPBOX_TOKEN }}
        run: php artisan lasso:publish --no-git

This is the error I get on github actions:

Screen Shot 2021-10-31 at 10 04 03 am

Sammyjo20 commented 2 years ago

Hi there.

Lasso does not require a database connection, nor does it use your database when publishing a bundle. Since you are using the --no-git flag, it will also upload the bundle to the Filesystem. Do you have any service providers that run which may require the database?