• 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: [beta, stable, 1.56.0]
22        include:
23          - rust: nightly
24            rustflags: --cfg thiserror_nightly_testing
25    timeout-minutes: 45
26    steps:
27      - uses: actions/checkout@v3
28      - uses: dtolnay/rust-toolchain@master
29        with:
30          toolchain: ${{matrix.rust}}
31          components: rust-src
32      - run: cargo test --all
33        env:
34          RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}
35
36  msrv:
37    name: Rust 1.31.0
38    runs-on: ubuntu-latest
39    timeout-minutes: 45
40    steps:
41      - uses: actions/checkout@v3
42      - uses: dtolnay/rust-toolchain@1.31.0
43        with:
44          components: rust-src
45      - run: cargo check
46
47  clippy:
48    name: Clippy
49    runs-on: ubuntu-latest
50    if: github.event_name != 'pull_request'
51    timeout-minutes: 45
52    steps:
53      - uses: actions/checkout@v3
54      - uses: dtolnay/rust-toolchain@nightly
55        with:
56          components: clippy, rust-src
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