Skip to main content

Laravel

Running the pre-built Laravel pipeline directly

Run the following command to run the pre-built Laravel pipeline without having to initialize a project:

fluentci run laravel_pipeline

Add Laravel Pipeline to your project

Run the following command to add a Laravel pipeline to your project:

fluentci init -t laravel

This will create a .fluentci directory in your project, feel free to customize the pipeline for your needs. You can then run the following command to start the pipeline:

fluentci run .

Environment variables

VariableDescriptionDefault Value
MARIADB_USERThe username for the MariaDB databaseuser
MARIADB_PASSWORDThe password for the MariaDB databasepassword
MARIADB_ROOT_PASSWORDThe root password for the MariaDB databaseroot

Jobs

JobDescription
testRun tests

Programmatic usage

You can also use this pipeline programmatically:

import { test } from "jsr:@fluentci/laravel";

await test();

CI/CD pipeline integrations

The following examples show how to integrate FluentCI with popular CI providers to test Laravel applications:

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Shutdown Ubuntu MySQL (SUDO)
run: |
sudo service mysql stop
sudo apt-get remove --purge mysql-server mysql-client mysql-common -y
sudo apt-get autoremove -y
sudo apt-get autoclean
sudo rm -rf /etc/mysql
sudo rm -rf /var/lib/mysql
- name: Setup Fluent CI CLI
uses: fluentci-io/setup-fluentci@v5
with:
wasm: true
plugin: mariadb
args: |
start
- name: test
run: fluentci run --wasm laravel test