PRQL / prql

PRQL is a modern language for transforming data — a simple, powerful, pipelined SQL replacement
https://prql-lang.org
Apache License 2.0
9.87k stars 216 forks source link

Improving GitHub workflows #37

Closed iafisher closed 1 year ago

iafisher commented 2 years ago

It would be nice to add a GitHub workflow to automatically format Rust code using rustfmt to ensure that all PRs use consistent formatting.

I found https://github.com/mbrobbel/rustfmt-check - it doesn't appear to be very widely used, but it might get the job done.

max-sixty commented 2 years ago

Yes good idea.

I've had lots of success with pre-commit, so if there are hooks for rustfmt on that, then that could work. It has a nice feature that it'll auto-fix PRs, and can be run locally: https://pre-commit.com/#pre-commitci-example. Here's the config we use in xarray: https://github.com/pydata/xarray/blob/main/.pre-commit-config.yaml

That GHA looks good too — fine to start with that!

max-sixty commented 2 years ago

Another thing we could run (maybe every day rather than on PRs) is cargo audit

max-sixty commented 2 years ago

We have a decent set of checks now, including rustfmt, and I just added pre-commit. If anyone is up for making a contribution here, things we could add:

Or any others — I'm always up for automating as much as possible.

max-sixty commented 2 years ago

https://gist.github.com/PurpleBooth/84b3d7d6669f77d5a53801a258ed269a has some great examples

max-sixty commented 2 years ago

https://github.com/max-sixty/prql/pull/289 now runs tests on all platforms on merge (or a specific PR label), and splits the tests up such that they complete in 32s

max-sixty commented 1 year ago

These are all done! Closing