chore(workflows): added more clippy tests #19
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
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
tests: | |
name: Tests | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- beta | |
- nightly | |
os: | |
- ubuntu-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: rustfmt, clippy | |
- name: Cache dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-nextest | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-nextest | |
- name: Format | |
run: cargo fmt -- --check | |
- name: Clippy --no-default-features | |
run: cargo clippy --no-default-features -- -D warnings | |
- name: Clippy -- default | |
run: cargo clippy --features=default -- -D warnings | |
- name: Clippy --all-features | |
run: cargo clippy --all --all-features -- -D warnings | |
# Codec | |
- name: Clippy -- codec | |
run: cargo clippy --features=codec -- -D warnings | |
# Iter | |
- name: Clippy -- iter | |
run: cargo clippy --features=iter -- -D warnings | |
- name: Clippy -- iter decoder-checks | |
run: cargo clippy --features="iter,decoder-checks" -- -D warnings | |
- name: Clippy -- iter decode-enmpty-buffer | |
run: cargo clippy --features="iter,decode-enmpty-buffer" -- -D warnings | |
- name: Clippy -- iter decoder-checks decode-enmpty-buffer | |
run: cargo clippy --features="iter,decoder-checks,decode-enmpty-buffer" -- -D warnings | |
# Futures | |
- name: Clippy -- futures | |
run: cargo clippy --features=futures -- -D warnings | |
- name: Clippy -- futures decoder-checks | |
run: cargo clippy --features="futures,decoder-checks" -- -D warnings | |
- name: Clippy -- futures decode-enmpty-buffer | |
run: cargo clippy --features="futures,decode-enmpty-buffer" -- -D warnings | |
- name: Clippy -- futures decoder-checks decode-enmpty-buffer | |
run: cargo clippy --features="futures,decoder-checks,decode-enmpty-buffer" -- -D warnings | |
# Compatibility | |
- name: Clippy -- std | |
run: cargo clippy --features=std -- -D warnings | |
- name: Clippy -- futures-io | |
run: cargo clippy --features=futures-io -- -D warnings | |
- name: Clippy -- embedded-io-async | |
run: cargo clippy --features=embedded-io-async -- -D warnings | |
- name: Clippy -- embedded-io | |
run: cargo clippy --features=embedded-io -- -D warnings | |
- name: Clippy -- tokio | |
run: cargo clippy --features=tokio -- -D warnings | |
# Defmt | |
- name: Clippy -- defmt | |
run: cargo clippy --features=defmt -- -D warnings | |
# Logging | |
- name: Clippy -- logging | |
run: cargo clippy --features=logging -- -D warnings | |
- name: Clippy -- logging pretty-hex-fmt | |
run: cargo clippy --features="logging,pretty-hex-fmt" -- -D warnings | |
- name: Clippy -- logging char-fmt | |
run: cargo clippy --features="logging,char-fmt" -- -D warnings | |
- name: Clippy -- logging log | |
run: cargo clippy --features="logging,log" -- -D warnings | |
- name: Clippy -- logging defmt | |
run: cargo clippy --features="logging,defmt" -- -D warnings | |
- name: Clippy -- logging tracing | |
run: cargo clippy --features="logging,tracing" -- -D warnings | |
- name: Test | |
run: cargo test --features "futures,codec,tokio" | |
# Some combinations are not tested because it is not possible to test them all |