Guides

# Continuous integration

Make CI fail when translations fall behind — one command, no credentials.

## The gate

`lingo validate --strict` is the CI command. It reads the committed locale files and `.i18n-state/`, reports what's missing or outdated, and exits `1` if any strict-tier violation is present — no API key required, so it's safe to run on every build.

```ruby
bundle exec bin/lingo validate --strict
```

## GitHub Actions

Add it as a step after `bundle install`:

```ruby
- name: Validate translations
  run: bundle exec bin/lingo validate --strict
```

## Choosing a tier

`--strict` fails on the `strict` tier (missing + outdated by default) — the pragmatic gate that keeps translations from silently falling behind. `--strict-all` uses the `strict_all` tier, which additionally fails on duplicate values (and, if enabled, manual edits) — a stricter bar for teams that want zero drift. Both tiers are configurable; see the [Configuration reference](https://locallingo.zoolutions.llc/docs/configuration-reference).

## Commit the state

For CI to detect drift, the `.i18n-state/` files must be committed alongside the locale files — they're the shared record of which source value each translation was made from. Treat them like any other source file in review.

> **Note:** Use `lingo hash` as a cache key to skip translation steps when the source locale hasn't changed between builds.