chore: Improve test coverage #770
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: CI | |
on: | |
pull_request: | |
merge_group: | |
push: | |
branches: | |
- master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: DEBUG | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 | |
- uses: r7kamura/rust-problem-matchers@v1 | |
- name: Check typos | |
uses: crate-ci/typos@master | |
- name: "Rustfmt" | |
run: cargo fmt --all --check | |
- name: Lint dependencies | |
uses: EmbarkStudios/cargo-deny-action@v2 | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: DEBUG | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 | |
- uses: r7kamura/rust-problem-matchers@v1 | |
- name: "Test" | |
run: cargo test --all-features --tests | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
env: | |
RUST_LOG: DEBUG | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy,rustfmt | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
- name: Cache Cargo dependencies | |
uses: Swatinem/rust-cache@v2 | |
- uses: r7kamura/rust-problem-matchers@v1 | |
- name: clippy | |
run: cargo clippy --workspace --all-features |