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