Skip to content

Continuous Integration

gruft offers integrations with CI services to ensure consistent code formatting and linting across your codebase.

Usage

For a read-only check, you can use the ci command to check your codebase for formatting and linting issues.

sh
gruft ci

GitHub Actions

A first-party GitHub Actions workflow is also available. This workflow is pre-configured to install the gruft CLI to your workflow.

yaml
name: Format and Lint

on:
  push:
  pull_request:

jobs:
  quality:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        
      - name: Setup gruft
        uses: gruft-dev/setup-gruft@v1 

      - name: Run gruft
        run: gruft ci

NOTE

The workflow automatically infers the version to use from your gruft.toml file. If no configuration is found, it will use the latest available version unless specified otherwise.