1name: CI
2
3on:
4  push:
5  pull_request:
6  schedule: [cron: "40 1 * * *"]
7
8jobs:
9  test:
10    name: Rust ${{matrix.rust}}
11    runs-on: ubuntu-latest
12    strategy:
13      fail-fast: false
14      matrix:
15        rust: [beta, stable, 1.45.0]
16        include:
17          - rust: nightly
18            rustflags: --cfg async_trait_nightly_testing
19    steps:
20      - uses: actions/checkout@v2
21      - uses: dtolnay/rust-toolchain@master
22        with:
23          toolchain: ${{matrix.rust}}
24      - run: cargo test
25        env:
26          RUSTFLAGS: ${{matrix.rustflags}}
27
28  msrv:
29    name: Rust 1.39.0
30    runs-on: ubuntu-latest
31    steps:
32      - uses: actions/checkout@v2
33      - uses: dtolnay/rust-toolchain@1.39.0
34      - run: cargo check
35
36  clippy:
37    name: Clippy
38    runs-on: ubuntu-latest
39    if: github.event_name != 'pull_request'
40    steps:
41      - uses: actions/checkout@v2
42      - uses: dtolnay/rust-toolchain@clippy
43      - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
44
45  outdated:
46    name: Outdated
47    runs-on: ubuntu-latest
48    if: github.event_name != 'pull_request'
49    steps:
50      - uses: actions/checkout@v2
51      - uses: dtolnay/install@cargo-outdated
52      - run: cargo outdated --exit-code 1
53