proc-macro-hack 0.5.20+deprecated

Procedural macros in expression position
Documentation
name: CI

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

permissions:
  contents: read

env:
  RUSTFLAGS: -Dwarnings

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.56.0, 1.31.0]
        include:
          - rust: nightly
          - rust: nightly
            name: Windows
            os: windows
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v3
      - 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
      - if: matrix.rust != '1.31.0'
        run: cargo test --all

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/rust-toolchain@clippy
      - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic

  outdated:
    name: Outdated
    runs-on: ubuntu-latest
    if: github.event_name != 'pull_request'
    timeout-minutes: 45
    steps:
      - uses: actions/checkout@v3
      - uses: dtolnay/install@cargo-outdated
      - run: cargo outdated --workspace --exit-code 1