diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d5ba13c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +# Lint + test gate on every push/PR to main. +# +# The README documents `cargo fmt --check`, `cargo clippy --all-targets +# -- -D warnings`, and `cargo test` as the quality bar; this job enforces it +# so nothing lands that doesn't pass its own checks. Releases are handled +# separately by `release.yml` (tag-triggered). + +name: ci + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + check: + name: fmt + clippy + test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + + - name: Format + run: cargo fmt --check + + - name: Clippy + run: cargo clippy --workspace --all-targets -- -D warnings + + - name: Test + run: cargo test --workspace diff --git a/Cargo.toml b/Cargo.toml index 406b5f1..997c5ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,6 @@ tokio = { version = "1", features = [ "net", ] } tokio-util = { version = "0.7", features = ["rt"] } -futures = "0.3" async-trait = "0.1" # Error handling