Closed ephraimbuddy closed 2 years ago
Maybe add a CI job to enforce pre-commit as well?
We should cache the pre-commit env as shown in this example https://pre-commit.com/#circleci-example
The example you linked is using https://pre-commit.ci/ which I think is a paid service from what they mentioned on the link. I think we should do with using our normal pre-commit and because we used this only on that step, I think we can get away without caching?
We should cache the pre-commit env as shown in this example https://pre-commit.com/#circleci-example
The example you linked is using https://pre-commit.ci/ which I think is a paid service from what they mentioned on the link. I think we should do with using our normal pre-commit and because we used this only on that step, I think we can get away without caching?
It's mentioned here on the benefits: https://pre-commit.com/#pre-commitci-example
We should cache the pre-commit env as shown in this example https://pre-commit.com/#circleci-example
The example you linked is using https://pre-commit.ci/ which I think is a paid service from what they mentioned on the link. I think we should do with using our normal pre-commit and because we used this only on that step, I think we can get away without caching?
It's mentioned here on the benefits: https://pre-commit.com/#pre-commitci-example
You can use it without pre-commit.ci too --- check https://github.com/astronomer/astro-runtime/blob/main/.circleci/jobs/static-checks.yml#L5-L21
steps:
- run:
command: |
cp .pre-commit-config.yaml pre-commit-cache-key.txt
python --version --version >> pre-commit-cache-key.txt
- restore_cache:
keys:
- v1-pc-cache-{{ checksum "pre-commit-cache-key.txt" }}
- run:
command: |
pre-commit run --diff-on-failure --all-files
- save_cache:
key: v1-pc-cache-{{ checksum "pre-commit-cache-key.txt" }}
paths:
- ~/.cache/pre-commit
give or take.
No pre-commit.ci needed.
Following the error I'm getting from another PR which is related to flake8, it makes sense to add pre-commit to help check errors before commits