• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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}}
17    runs-on: ubuntu-latest
18    strategy:
19      fail-fast: false
20      matrix:
21        rust: [nightly, beta, stable, 1.56.0]
22    timeout-minutes: 45
23    steps:
24      - uses: actions/checkout@v3
25      - uses: dtolnay/rust-toolchain@master
26        with:
27          toolchain: ${{matrix.rust}}
28      - run: cargo test
29
30  msrv:
31    name: Rust 1.31.0
32    runs-on: ubuntu-latest
33    timeout-minutes: 45
34    steps:
35      - uses: actions/checkout@v3
36      - uses: dtolnay/rust-toolchain@1.31.0
37      - run: cargo check
38
39  minimal:
40    name: Minimal versions
41    runs-on: ubuntu-latest
42    timeout-minutes: 45
43    steps:
44      - uses: actions/checkout@v3
45      - uses: dtolnay/rust-toolchain@nightly
46      - run: cargo -Z minimal-versions generate-lockfile
47      - run: cargo check --locked
48
49  clippy:
50    name: Clippy
51    runs-on: ubuntu-latest
52    if: github.event_name != 'pull_request'
53    timeout-minutes: 45
54    steps:
55      - uses: actions/checkout@v3
56      - uses: dtolnay/rust-toolchain@clippy
57      - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
58
59  miri:
60    name: Miri
61    runs-on: ubuntu-latest
62    timeout-minutes: 45
63    steps:
64      - uses: actions/checkout@v3
65      - uses: dtolnay/rust-toolchain@miri
66      - run: cargo miri test
67        env:
68          MIRIFLAGS: -Zmiri-strict-provenance
69
70  outdated:
71    name: Outdated
72    runs-on: ubuntu-latest
73    if: github.event_name != 'pull_request'
74    timeout-minutes: 45
75    steps:
76      - uses: actions/checkout@v3
77      - uses: dtolnay/install@cargo-outdated
78      - run: cargo outdated --workspace --exit-code 1
79