python-trio / flake8-async

Highly opinionated linter for Trio code
https://flake8-async.readthedocs.io
MIT License
17 stars 2 forks source link

run all of pre-commit directly from the gh CI action #99

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

Fixes #97 Re-renamed back typing to check, and GH CI now runs all of pre-commit and not just pyright.

jakkdl commented 1 year ago

Looks like it has to reinitialize all the pre-commit environments on every run, whereas it'll reuse cached ones with the direct CI https://results.pre-commit.ci/run/github/514831223/1673533188.mO0ekGxrSQmivBCtgf0aCw but at least that run had to queue for a minute so it ended up taking about the same amount of time.

Zac-HD commented 1 year ago

Looks like it has to reinitialize all the pre-commit environments on every run, whereas it'll reuse cached ones with the direct CI https://results.pre-commit.ci/run/github/514831223/1673533188.mO0ekGxrSQmivBCtgf0aCw but at least that run had to queue for a minute so it ended up taking about the same amount of time.

We can set up caching for Actions so that's fast too: https://tobiasmcnulty.com/posts/caching-pre-commit/

jakkdl commented 1 year ago

Hrm, that means we need to start keeping around a requirements.txt file that needs to be updated every once in a while too. It's maybe possible to use setup.py, but regardless this starts getting kinda messy. Think I'm starting to prefer having the app added to the repo instead of manually messing around with files and caches and versions.

Zac-HD commented 1 year ago

Fair point, let's not bother with caching then 😂