1on: [push, pull_request] 2 3name: Continuous integration 4 5jobs: 6 check: 7 name: Check 8 runs-on: ubuntu-latest 9 strategy: 10 matrix: 11 rust: 12 - stable 13 - 1.44.0 14 - nightly 15 steps: 16 - uses: actions/checkout@v2 17 - uses: actions-rs/toolchain@v1 18 with: 19 profile: minimal 20 toolchain: ${{ matrix.rust }} 21 override: true 22 - name: Cargo update 23 run: cargo update 24 - uses: actions-rs/cargo@v1 25 with: 26 command: check 27 28 test: 29 name: Test Suite 30 runs-on: ubuntu-latest 31 steps: 32 - uses: actions/checkout@v2 33 - uses: actions-rs/toolchain@v1 34 with: 35 profile: minimal 36 toolchain: stable 37 override: true 38 - uses: actions-rs/cargo@v1 39 with: 40 command: test 41 42 fmt: 43 name: Rustfmt 44 runs-on: ubuntu-latest 45 steps: 46 - uses: actions/checkout@v2 47 - uses: actions-rs/toolchain@v1 48 with: 49 profile: minimal 50 toolchain: stable 51 override: true 52 - run: rustup component add rustfmt 53 - uses: actions-rs/cargo@v1 54 with: 55 command: fmt 56 args: --all -- --check 57 58 clippy: 59 name: Clippy 60 runs-on: ubuntu-latest 61 steps: 62 - uses: actions/checkout@v2 63 - uses: actions-rs/toolchain@v1 64 with: 65 profile: minimal 66 toolchain: stable 67 override: true 68 - run: rustup component add clippy 69 - uses: actions-rs/cargo@v1 70 with: 71 command: clippy 72 args: -- -D warnings 73 74 doc: 75 name: Build documentation 76 runs-on: ubuntu-latest 77 env: 78 RUSTDOCFLAGS: --cfg docsrs 79 steps: 80 - uses: actions/checkout@v2 81 - uses: actions-rs/toolchain@v1 82 with: 83 profile: minimal 84 toolchain: nightly 85 override: true 86 - uses: actions-rs/cargo@v1 87 with: 88 command: doc 89 args: --workspace --no-deps --all-features 90