Skip to main content

Ruby

Running the pre-built Ruby pipeline directly​

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

fluentci run ruby rspec

Add Ruby Pipeline to your project​

Run the following command to add Ruby pipeline to your project:

fluentci init -t ruby

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​

VariableDescription
HEROKU_APP_NAMEThe name of the Heroku app to deploy to
HEROKU_PRODUCTION_KEYThe API key to use to deploy to Heroku

Jobs​

JobDescription
rubocopRuns Rubocop
railsRuns Rails tests
rspecRuns RSpec tests
herokuDeployDeploys to Heroku

Programmatic usage​

You can also use this pipeline programmatically:

import { rubocop, rails, rspec } from "jsr:@fluentci/ruby";

await rubocop();
await rails();
await rspec();

CI/CD pipeline integrations​

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

ci.yml
name: ci
on:
push:
branches:
- main
jobs:
tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Fluent CI
uses: fluentci-io/setup-fluentci@v5
- name: rubocop
run: fluentci run --wasm ruby rubocop
- name: test
run: fluentci run --wasm ruby rspec