name: CI

on:
  push:
  pull_request:
  schedule: [cron: "40 1 * * *"]

jobs:
  test:
    name: Rust ${{matrix.rust}}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        rust: [nightly, beta, stable, 1.36.0, 1.31.0]
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{matrix.rust}}
      - run: cargo test
      - run: cargo check --no-default-features
      - run: cargo check --no-default-features --features alloc
        if: matrix.rust != '1.31.0'

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@clippy
      - run: cargo clippy -- -Dclippy::all

name: CI

on:
  push:
  pull_request:
  schedule: [cron: "40 1 * * *"]

jobs:
  test:
    name: Rust ${{matrix.rust}}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        rust: [nightly, beta, stable, 1.36.0, 1.34.0, 1.31.0]
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{matrix.rust}}
      - run: cargo test
        if: matrix.rust != '1.31.0' && matrix.rust != '1.34.0'
      - run: cargo check --no-default-features
      - run: cargo check --no-default-features --features alloc
        if: matrix.rust != '1.31.0' && matrix.rust != '1.34.0'

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@clippy
      - run: cargo clippy -- -Dclippy::all

Raise minimum tested version to rustc 1.34.0
Raise minimum tested version to rustc 1.34.0

Required by the byteorder dev-dependency.

    error[E0277]: the trait bound `[u8; 2]: std::convert::From<&[u8]>` is not satisfied
        --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/byteorder-1.4.2/src/lib.rs:1959:37
         |
    1959 |         u16::from_be_bytes(buf[..2].try_into().unwrap())
         |                                     ^^^^^^^^ the trait `std::convert::From<&[u8]>` is not implemented for `[u8; 2]`
         |
         = note: required because of the requirements on the impl of `std::convert::TryFrom<&[u8]>` for `[u8; 2]`
         = note: required because of the requirements on the impl of `std::convert::TryInto<[u8; 2]>` for `&[u8]`
