chore: 配置 CI 与 cargo-deny

This commit is contained in:
2026-06-05 01:29:58 +08:00
parent faff18a8fc
commit 49ec2c7224
2 changed files with 44 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
+10
View File
@@ -0,0 +1,10 @@
[licenses]
allow = ["MIT", "Apache-2.0", "ISC", "BSD-2-Clause", "BSD-3-Clause"]
unlicensed = "deny"
[bans]
multiple-versions = "warn"
[advisories]
vulnerability = "deny"
unmaintained = "warn"