CI for Laravel

Puppeteer and Browsershot

If you're making use of Puppeteer or Browsershot, you'll need to run a few commands to get this working in Chipper CI.

You don't need to install a browser (such as Chrome), as installing Puppeteer will do that for you. However, there are a few system dependencies needed.

Here's an example pipeline script to get those dependencies.

  - name: Install Puppeteer Dependencies
    cmd: |
      npm install puppeteer
      sudo apt-get update
      sudo apt-get install -y xvfb libnss3 libgtk-3-dev libasound2

      # Optionally install additional fonts (but probably don't)
      sudo apt-get install -y fontconfig \
           fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg \
           fonts-kacst fonts-symbola fonts-noto fonts-freefont-ttf

Note that your package.json may already define puppeteer as a dependency, in which case you don't need to run the npm install command.

If you're using Browsershot, I'm assuming you've included it into your codebase via composer require spatie/browsershot.