1Password / load-secrets-action

Load secrets from 1Password into your GitHub Actions jobs
https://developer.1password.com
MIT License
197 stars 27 forks source link

Check formatting in CI/CD pipeline #84

Open Marton6 opened 1 day ago

Marton6 commented 1 day ago

Overview

Currently we have pre-commit and pre-push hooks that detect formatting errors in all files checked into the repo.

One problem is that, if you don't have husky installed and set up these commit hooks won't run and formatting errors may slip into the codebase.

To prevent these errors from reaching the main branch, we should also run npm run validate in CI.

Expected outcome

All formatting errors in js code, config files, scripts and markdown files should be detected by our CI pipeline before merging to main.

Context

While reviewing this MR submitted to this repository by a contributor who had set up husky, we noticed that husky automatically fixed some formatting errors it detected in unrelated files (CONTRIBUTING.MD). This signaled to us that formatting errors have accidentally been merged to main previously.