name: CI

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

jobs:
  test:
    name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
    runs-on: ${{matrix.os || 'ubuntu'}}-latest
    strategy:
      fail-fast: false
      matrix:
        rust: [beta, stable, 1.45.0, 1.42.0, 1.31.0]
        include:
          - rust: nightly
          - rust: nightly
            name: Windows
            os: windows
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{matrix.rust}}
      - if: matrix.rust == '1.31.0'
        run: echo 'extern crate proc_macro;' >> demo-hack-impl/src/lib.rs
      - run: cargo run --manifest-path example/Cargo.toml
      - run: cargo test --all

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

name: CI

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

jobs:
  test:
    name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
    runs-on: ${{matrix.os || 'ubuntu'}}-latest
    strategy:
      fail-fast: false
      matrix:
        rust: [beta, stable, 1.45.0, 1.42.0, 1.34.0, 1.31.0]
        include:
          - rust: nightly
          - rust: nightly
            name: Windows
            os: windows
    steps:
      - uses: actions/checkout@v2
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{matrix.rust}}
      - if: matrix.rust == '1.31.0' || matrix.rust == '1.34.0'
        run: echo 'extern crate proc_macro;' >> demo-hack-impl/src/lib.rs
      - run: cargo run --manifest-path example/Cargo.toml
      - if: matrix.rust != '1.31.0'
        run: cargo test --all

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

Raise minimum tested compiler to rustc 1.34
Raise minimum tested compiler to rustc 1.34
