-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial rust CI: testing with coverage report, and formatting/lin…
…ting
- Loading branch information
1 parent
143e4cb
commit a404292
Showing
1 changed file
with
38 additions
and
0 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,38 @@ | ||
name: Rust CI | ||
|
||
on: push | ||
|
||
defaults: | ||
run: | ||
working-directory: server | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
CARGO_INCREMENTAL: 0 | ||
CARGO_NET_RETRY: 10 | ||
RUST_BACKTRACE: short | ||
RUSTFLAGS: "-D warnings" | ||
RUSTUP_MAX_RETRIES: 10 | ||
|
||
jobs: | ||
coverage-and-linting: | ||
name: Test coverage & linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust Toolchain | ||
uses: ./.github/actions/toolchain-cargo-cached | ||
with: | ||
components: llvm-tools-preview, rustfmt, clippy | ||
crates: cargo-llvm-cov | ||
|
||
- name: Tests & coverage | ||
run: cargo llvm-cov test --no-fail-fast --workspace | ||
|
||
- name: Linting rustfmt | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Linting clippy | ||
run: cargo clippy -- |