language: rust
rust:
  - 1.45.0
  - stable
  - beta
  - nightly

script:
  - cargo build --verbose --workspace
  - cargo test --verbose --workspace --no-run
  - cargo test --verbose --workspace

os:
  - windows
  - linux
  - osx

jobs:
  fast_finish: true
  allow_failures:
    - rust: nightly

  include:
    - name: 'Rust: lint with Clippy'
      rust: stable
      install:
        - rustup component add clippy
      script:
        - cargo clippy

    - name: 'Rust: mutation testing'
      rust: nightly
      install:
        - git clone https://github.com/llogiq/mutagen.git
        - cd mutagen/mutagen-runner
        - cargo install --path .
        - cd ../..
      script:
        - cargo test    --package dns --features=dns/with_mutagen -- --quiet
        - cargo mutagen --package dns --features=dns/with_mutagen