setup ci along with cargo deny

This commit is contained in:
Bilal Elmoussaoui 2025-02-13 13:33:49 +01:00
parent a3b5ae9839
commit 01d98dc807
2 changed files with 95 additions and 0 deletions

77
.github/workflows/CI.yml vendored Normal file
View file

@ -0,0 +1,77 @@
on:
push:
branches: [main]
pull_request:
name: CI
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt install libpcsclite-dev -y
- uses: actions-rs/cargo@v1
with:
command: check
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt install libpcsclite-dev -y
- uses: actions-rs/cargo@v1
with:
command: test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt install libpcsclite-dev -y
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: sudo apt install libpcsclite-dev -y
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

18
deny.toml Normal file
View file

@ -0,0 +1,18 @@
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
ignore = []
[licenses]
allow = [
"MIT", # from ouroboros
"Unicode-3.0",
"ISC", # from iso7816-tlv
"BSD-3-Clause"
]
[bans]
multiple-versions = "deny"
wildcards = "deny"
highlight = "all"