mp2722 0.1.0

Driver for the MP2722 battery charging ic
Documentation
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target:
          - x86_64-unknown-linux-gnu
          - thumbv7em-none-eabi
    steps:
      - uses: actions/checkout@v2
      - name: Install Toolchain 
        run: rustup target add ${{ matrix.target }}
      - name: Build
        run: cargo build --release --target=${{ matrix.target }}

  test:
    name: Test Suite
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Cargo Test
        run: cargo test --verbose 

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v2

      - name: Run cargo fmt
        run: cargo fmt --all -- --check

      - name: Run cargo clippy
        run: cargo clippy -- -D warnings