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

Deny PRs where shfmt doesn't pass #1941

Merged
merged 2 commits into from
Aug 31, 2024
Merged

Conversation

selfhoster1312
Copy link
Contributor

@selfhoster1312 selfhoster1312 commented Aug 30, 2024

Hopefully this should fail as the scripts don't pass. This is just an initial attempt i haven't checked that the CI syntax is good... Wait for it ! :)

EDIT: All is good now and it was successfully applied.

@selfhoster1312 selfhoster1312 force-pushed the shfmt branch 5 times, most recently from e9283f6 to c5002a1 Compare August 30, 2024 17:39
@selfhoster1312
Copy link
Contributor Author

Ready for review

@selfhoster1312
Copy link
Contributor Author

So with the new helpers you can do:

  • just check, just pre-commit, or just lint
  • make check
  • ./maintenance/pre-commit-check.sh
  • act

The last option, act, will setup something that's really close to a Github CI runner and run the actual tests through docker. That's the entire concept and power of act and it's great!

The first 3 options require that shfmt is already setup. It's been available since like forever in distro repositories. The second option requires act which can be setup in multiple ways including one that's as simple as nix shell -p act, as long as you already have docker/podman running.

I think that's already quite a few options and i'm happy to document them. Feedback is welcome.

@Salamandar Salamandar force-pushed the shfmt branch 2 times, most recently from c54afcb to 8f4ffab Compare August 31, 2024 09:11
Makefile Outdated Show resolved Hide resolved
hooks/conf_regen/35-postgresql Show resolved Hide resolved
hooks/conf_regen/10-apt Outdated Show resolved Hide resolved
helpers/helpers.v2.1.d/sources Outdated Show resolved Hide resolved
maintenance/pre-commit-check.sh Outdated Show resolved Hide resolved
maintenance/pre-commit-check.sh Outdated Show resolved Hide resolved
maintenance/pre-commit-check.sh Outdated Show resolved Hide resolved
@Salamandar Salamandar merged commit 8a5f280 into YunoHost:dev Aug 31, 2024
2 checks passed
@Salamandar
Copy link
Contributor

Thank you @selfhoster1312 <3 For the rest of your commits I pushed the shfmt_action branch, you can open a PR yourself if you want :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants