add actions #3
38
.gitea/workflows/checks.yaml
Normal file
38
.gitea/workflows/checks.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
name: "Code Checks"
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
# Check formatting with rustfmt
|
||||
formatting:
|
||||
name: cargo fmt
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# Ensure rustfmt is installed and setup problem matcher
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: rustfmt
|
||||
- name: Rustfmt Check
|
||||
uses: actions-rust-lang/rustfmt@v1
|
||||
|
||||
# Check code with clippy
|
||||
clippy:
|
||||
name: cargo clippy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# Ensure clippy is installed and setup problem matcher
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
with:
|
||||
components: clippy
|
||||
- run: cargo clippy -- -D warnings
|
||||
|
||||
# Run tests
|
||||
test:
|
||||
name: cargo test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
- run: cargo test
|
@ -1,5 +1,5 @@
|
||||
#![warn(clippy::pedantic)]
|
||||
// #![allow(clippy::missing_errors_doc)]
|
||||
#![allow(clippy::let_underscore_untyped)] // false positive in stable
|
||||
|
||||
use std::{
|
||||
fmt::Debug,
|
||||
|
Loading…
Reference in New Issue
Block a user