CI for Laravel

Getting Started

After setting up a project, you'll be given an example .chipperci.yml file. Chipper CI gets instructions on how to run, build, and test your application from that file.

Here's the complete specification for the .chipperci.yml file. It's not too bad!

This file should exist in the root of your repository. You should add this file, and push up a new commit that includes that file.

Here's an example .chipperci.yml file that can get you started:

version: 1

environment:
  php: 8.3
  node: 18

services:
  - mysql: 5.7
  - redis:

# Build all commits
on:
   push:
      branches: .*

pipeline:
  - name: Setup
    cmd: |
      cp -v .env.example .env
      composer install --no-interaction --prefer-dist --optimize-autoloader
      php artisan key:generate

  - name: Compile Dev Assets
    cmd: |
      npm ci --no-audit
      npm run build

  - name: Test
    cmd: phpunit

If your repository does not have a .chipperci.yml file, the environment, services, pipeline, and build restrictions can be configured within your project settings at app.chipperci.com.

Elements of the Yaml File

The YAML configuration is simple (as far as YAML goes). What you see above is has all the available elements:

  1. version - Just use 1 until further notice
  2. environment - Set the PHP and Node versions
  3. on - Define what triggers a build (every commit, only certain branches, pull requests, etc)
  4. services - Optionally add a database, cache (redis), or Docker (Docker is on paid accounts only)
  5. pipeline - A list of commands to run, which examples of adding multi-line commands
    • Definitely check out the docs on best practices for more complex scripts

There's actually not much more to it, however you can see every available option here.