ina226-tp 0.4.1

Rust Driver for device INA226 High-Side or Low-Side Measurement, Bi-Direcional Current and Power Monitor
Documentation
name: Rust CI

on:
  push:
    branches: [ "main", "no_flt" ]
  pull_request:
    branches: [ "main", "no_flt" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      matrix:
        features:
          - ""
          - "no_float"
          - "async"
          - "async no_float"
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Build
        run: cargo build --verbose --features "${{ matrix.features }}"
      - name: Run tests
        run: cargo test --verbose --features "${{ matrix.features }}"

  lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Format check
        run: cargo fmt -- --check
      - name: Clippy check
        run: cargo clippy -- -D warnings