Open OliverFM opened 1 year ago
I'm gonna start working on this. From what I can tell, a git hook is what we're looking for here.
https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks
This is cool, but it only seems to work on the client side.
Maybe there's some GitHub feature to do verification here?
I'll give the server-side hooks a shot.
Hmm, okay so I've found something for just pushes in general to the server, but something for merging PRs is rather difficult.
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Format code
run: cargo fmt
- name: Run Clippy
run: cargo clippy
This might actually be the solution to the problem here. I tried testing it locally but no luck. I'll try to test it on a remote repository.
Okay, yeah so the important part is this:
cargo clippy --verbose --all-features -- -D warnings
^^^^^^^^^^^
This allows it to fail on warnings.
Covered in #35.
Can this be closed now?
Can this be closed now?
@aidenfoxivey not quite, since the PRs aren't yet blocked on this check, so it is 90% of the way there. I haven't found the time to get it completely over the line though 😿
Currently many things are failing, and I probably won't fix them all unless I have to. This is in large part because I have added various helper methods that I know I will need even if I haven't run into the need to use them yet.