test_task:
  matrix:
    - name: 1.42.0
      container:
        image: rust:1.42.0
    - name: stable
      container:
        image: rust:latest
    - name: nightly
      container:
        image: rustlang/rust:nightly
      env:
        CARGO_ARGS: --all-features
  cargo_cache:
    folder: $CARGO_HOME/registry
  build_script:
    - cargo build $CARGO_ARGS --all
  test_script:
    - cargo test $CARGO_ARGS --all
  example_script:
    - cargo test $CARGO_ARGS --all --examples
  doc_script:
    - cargo doc $CARGO_ARGS --no-deps --all
  before_cache_script: rm -rf $CARGO_HOME/registry/index

minver_task:
  name: minver
  depends_on:
    - 1.42.0
    - stable
    - nightly
  matrix:
    - container:
       image: rustlang/rust:nightly
  cargo_cache:
    folder: $CARGO_HOME/registry
  test_script:
    - cargo update -Zminimal-versions
    - cargo test --all-features --all
  before_cache_script: rm -rf $CARGO_HOME/registry/index

test_task:
  matrix:
    - name: 1.42.0
      container:
        image: rust:1.42.0
    - name: stable
      container:
        image: rust:latest
    - name: nightly
      container:
        image: rustlang/rust:nightly
      env:
        CARGO_ARGS: --all-features
  cargo_cache:
    folder: $CARGO_HOME/registry
  build_script:
    - cargo build $CARGO_ARGS --all
  test_script:
    - cargo test $CARGO_ARGS --all
  example_script:
    - cargo test $CARGO_ARGS --all --examples
  doc_script:
    - cargo doc $CARGO_ARGS --no-deps --all
  before_cache_script: rm -rf $CARGO_HOME/registry/index

minver_task:
  name: minver
  depends_on:
    - 1.42.0
    - stable
    - nightly
    - clippy
  matrix:
    - container:
       image: rustlang/rust:nightly
  cargo_cache:
    folder: $CARGO_HOME/registry
  test_script:
    - cargo update -Zminimal-versions
    - cargo test --all-features --all
  before_cache_script: rm -rf $CARGO_HOME/registry/index

clippy_task:
  name: clippy
  matrix:
    - container:
       image: rust:latest
  cargo_cache:
    folder: $CARGO_HOME/registry
  lint_script:
    - cargo clippy --all-targets --workspace -- -D warnings
  before_cache_script: rm -rf $CARGO_HOME/registry/index

Enable clippy in Cirrus CI
Enable clippy in Cirrus CI
