• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: CI
2
3on:
4  push:
5  pull_request:
6  workflow_dispatch:
7  schedule: [cron: "40 1 * * *"]
8
9permissions:
10  contents: read
11
12env:
13  RUSTFLAGS: -Dwarnings
14
15jobs:
16  test:
17    name: Rust ${{matrix.rust}}
18    runs-on: ubuntu-latest
19    strategy:
20      fail-fast: false
21      matrix:
22        rust: [stable, beta, nightly, 1.56.0]
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 build
30      - run: cargo test --features serde/derive,serde/rc
31
32  minimal:
33    name: Minimal versions
34    runs-on: ubuntu-latest
35    timeout-minutes: 45
36    steps:
37      - uses: actions/checkout@v3
38      - uses: dtolnay/rust-toolchain@nightly
39      - run: cargo generate-lockfile -Z minimal-versions
40      - run: cargo check --locked
41
42  clippy:
43    name: Clippy
44    runs-on: ubuntu-latest
45    if: github.event_name != 'pull_request'
46    timeout-minutes: 45
47    steps:
48      - uses: actions/checkout@v3
49      - uses: dtolnay/rust-toolchain@clippy
50      - run: cargo clippy -- -Dclippy::all -Dclippy::pedantic
51
52  outdated:
53    name: Outdated
54    runs-on: ubuntu-latest
55    if: github.event_name != 'pull_request'
56    timeout-minutes: 45
57    steps:
58      - uses: actions/checkout@v3
59      - uses: dtolnay/install@cargo-outdated
60      - run: cargo outdated --workspace --exit-code 1
61