-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add rust linting github workflow (#674)
* add rust lint workflows * add cargo-deny config file * update lockfile * add license to rust package * fix formatting --------- Co-authored-by: daniel.eades <[email protected]>
- Loading branch information
1 parent
c5a8b5a
commit 33a0436
Showing
5 changed files
with
261 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
name: Rust Continuous integration | ||
|
||
defaults: | ||
run: | ||
working-directory: ./server | ||
|
||
jobs: | ||
|
||
# test: | ||
# name: test | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# matrix: | ||
# os: [ubuntu-latest, macos-latest, windows-latest] | ||
# toolchain: [stable] | ||
# include: | ||
# - os: ubuntu-latest | ||
# toolchain: nightly | ||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - uses: dtolnay/rust-toolchain@master | ||
# with: | ||
# toolchain: ${{ matrix.toolchain }} | ||
# - run: cargo test --all-features | ||
|
||
fmt: | ||
name: format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- run: cargo fmt --all --check | ||
|
||
clippy: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly-2023-12-10 | ||
components: clippy | ||
- uses: actions-rs-plus/clippy-check@v2 | ||
with: | ||
working-directory: server/ | ||
args: --all-features --all-targets | ||
|
||
docs: | ||
name: docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- run: cargo doc --no-deps | ||
|
||
cargo-deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
arguments: --manifest-path server/Cargo.toml |
Oops, something went wrong.