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