Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

greenlight 🟢

ci python

Run your CI gates locally, before you push. greenlight fails on your machine in five seconds instead of on github in five minutes.

i got tired of pushing, alt-tabbing to the actions tab, and watching lint fail on something i could've caught locally. so: a pre-push hook that runs the same gates CI runs, in parallel, and blocks the push if any of them are red.

install

pip install greenlight-cli

quickstart

greenlight init          # writes a starter .greenlight.yml
greenlight run           # run every gate right now
greenlight install-hook  # block `git push` unless everything is green

config

.greenlight.yml:

parallel: true
gates:
  - name: lint
    run: ruff check .
  - name: types
    run: mypy .
    allow_fail: true      # runs, but won't block the push
  - name: tests
    run: pytest -q

why not just use CI?

use both. CI is the source of truth. greenlight is the fast feedback loop so CI stops being the thing that tells you that you forgot to run the tests.

license

MIT

About

run your CI gates locally before you push. a fast pre-push hook that fails before github does.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages