GitHub Action
The LumenFlow Gates GitHub Action runs your quality gates in CI/CD pipelines. It reads your gate configuration from .lumenflow.config.yaml and executes the appropriate checks.
Quick Start
Section titled “Quick Start”-
Add configuration (if not already present)
-
Add the workflow
-
Get your token
Sign up at lumenflow.dev and add your
LUMENFLOW_TOKENto repository secrets.
Inputs
Section titled “Inputs”| Input | Description | Required | Default |
|---|---|---|---|
token | LumenFlow API token for usage tracking | Yes | - |
working-directory | Directory to run commands in | No | . |
skip-format | Skip format check | No | false |
skip-lint | Skip lint check | No | false |
skip-typecheck | Skip type check | No | false |
skip-test | Skip tests | No | false |
Outputs
Section titled “Outputs”| Output | Description |
|---|---|
preset-detected | The preset or config mode that was used |
gates-passed | Whether all gates passed (true/false) |
Using Presets
Section titled “Using Presets”For common languages, specify a preset instead of individual commands:
Preset Defaults
Section titled “Preset Defaults”| Preset | Format | Lint | Typecheck | Test |
|---|---|---|---|---|
node | prettier --check . | eslint . | tsc --noEmit | npm test |
python | ruff format --check . | ruff check . | mypy . | pytest |
go | gofmt -l . | golangci-lint | go vet ./... | go test ./... |
rust | cargo fmt --check | cargo clippy | cargo check | cargo test |
dotnet | dotnet format --verify | dotnet build | - | dotnet test |
Overriding Preset Commands
Section titled “Overriding Preset Commands”You can use a preset and override specific commands:
Command Options
Section titled “Command Options”Commands can be strings or objects with additional options:
Full Workflow Examples
Section titled “Full Workflow Examples”Node.js with pnpm
Section titled “Node.js with pnpm”Python with Poetry
Section titled “Python with Poetry”Monorepo Support
Section titled “Monorepo Support”Run gates on specific packages in a monorepo:
Skipping Gates
Section titled “Skipping Gates”Skip specific gates when needed:
Or conditionally based on changed files:
Auto-Detection Fallback
Section titled “Auto-Detection Fallback”If no gates.execution config is present, the action auto-detects your project type based on files:
| File | Detected Language |
|---|---|
package.json | Node.js |
pyproject.toml | Python |
go.mod | Go |
Cargo.toml | Rust |
*.csproj | .NET |
Troubleshooting
Section titled “Troubleshooting”Gate fails but works locally
Section titled “Gate fails but works locally”Ensure your CI environment matches local:
- Same Node/Python/Go version
- Same package manager (pnpm vs npm)
- Dependencies installed before gates run
Token issues
Section titled “Token issues”- Verify
LUMENFLOW_TOKENis set in repository secrets - Check the token is valid at lumenflow.dev/settings
- Ensure the token has access to the repository
Timeout errors
Section titled “Timeout errors”Increase the timeout for slow commands:
Next Steps
Section titled “Next Steps”- Gates Concepts - Understanding gates
- Configuration Reference - Full config schema
- CLI Reference - Running gates locally