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.ymlfile. 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.1 node: 16 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 dev - name: Test cmd: phpunit
If your repository does not have a
.chipperci.ymlfile, 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:
version- Just use
1until further notice
environment- Set the PHP and Node versions
on- Define what triggers a build (every commit, only certain branches, pull requests, etc)
services- Optionally add a database, cache (redis), or Docker (Docker is on paid accounts only)
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.