Example PHP Pipeline
This guide covers configuring continuous integration pipelines for PHP projects. If you’re new to Drone please read our Tutorial and build configuration guides first.
Build and Test
In the below example we demonstrate a pipeline that installs the project dependnecies using composer, and then executes the project unit tests. These commands are executed inside a Docker container, downloaded at runtime from DockerHub.
- name: install
- composer install
- name: test
- vendor/bin/phpunit --configuration config.xml
This example assumes phpunit is a dev dependency in
Please note you can use any Docker image in your pipeline from any Docker registry. You can use the official php or composer images, or you can bring your own.