Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve pre-commit run on GHA #1782

Merged
merged 3 commits into from
May 4, 2023
Merged

Conversation

pmeier
Copy link
Member

@pmeier pmeier commented May 3, 2023

The comment

# https://github.com/pre-commit/action to enable cache
- uses: pre-commit/action@v3.0.0

is not the full picture. The action also installs pre-commit and runs it against all files by default. Meaning, we are currently installing pre-commit for nothing

- name: Install pre-commit 📦
run: pip install pre-commit

and running the terraform_fmt hook twice:

- name: Run terraform pre-commit ⚡️
run: pre-commit run terraform_fmt

This PR improves this by only running the terraform_fmt hook through the action.

@pmeier
Copy link
Member Author

pmeier commented May 3, 2023

1c2ba6b demonstrates that we still catch formatting issues.

@pmeier pmeier merged commit fea0d75 into nebari-dev:develop May 4, 2023
@pmeier pmeier deleted the pre-commit-gha branch May 10, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants