Skip to content

Implement a lossy queue for outgoing packets #20

Implement a lossy queue for outgoing packets

Implement a lossy queue for outgoing packets #20

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request: {}
jobs:
test:
name: "Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup build cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup buildx
uses: docker/setup-buildx-action@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cargo check basic
run: cargo check --no-default-features
- name: Cargo check serde
run: cargo check --no-default-features --features serde
- name: Cargo check homeassistant
run: cargo check --no-default-features --features homeassistant,defmt
- name: Cargo check homeassistant
run: cargo check --no-default-features --features homeassistant,log
- name: Run tests
run: cargo test
lint:
name: "Lints"
runs-on: ubuntu-latest
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore build cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Clippy
run: cargo clippy -- --deny "warnings"
- name: Rustfmt
run: cargo fmt --check
- name: Check for unused dependencies
uses: bnjbvr/cargo-machete@main
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: default-features