| 1 | on: |
| 2 | push: |
| 3 | pull_request: |
| 4 | schedule: |
| 5 | - cron: '0 0 * * *' |
| 6 | |
| 7 | name: Continuous integration |
| 8 | |
| 9 | jobs: |
| 10 | check: |
| 11 | name: Check |
| 12 | runs-on: ubuntu-latest |
| 13 | strategy: |
| 14 | matrix: |
| 15 | rust: |
| 16 | - stable |
| 17 | - 1.56.0 |
| 18 | steps: |
| 19 | - uses: actions/checkout@v1 |
| 20 | - uses: actions-rs/toolchain@v1 |
| 21 | with: |
| 22 | toolchain: ${{ matrix.rust }} |
| 23 | override: true |
| 24 | - uses: actions-rs/cargo@v1 |
| 25 | with: |
| 26 | command: check |
| 27 | |
| 28 | test: |
| 29 | name: Test Suite |
| 30 | runs-on: ubuntu-latest |
| 31 | strategy: |
| 32 | matrix: |
| 33 | rust: |
| 34 | - stable |
| 35 | - nightly |
| 36 | steps: |
| 37 | - uses: actions/checkout@v1 |
| 38 | - uses: actions-rs/toolchain@v1 |
| 39 | with: |
| 40 | toolchain: ${{ matrix.rust }} |
| 41 | override: true |
| 42 | - uses: Swatinem/rust-cache@v1 |
| 43 | - name: Install cargo-nextest |
| 44 | uses: baptiste0928/cargo-install@v1 |
| 45 | with: |
| 46 | crate: cargo-nextest |
| 47 | version: 0.9 |
| 48 | - uses: actions-rs/cargo@v1 |
| 49 | with: |
| 50 | command: nextest |
| 51 | args: run |
| 52 | - uses: actions-rs/cargo@v1 |
| 53 | with: |
| 54 | command: nextest |
| 55 | args: run --no-default-features |
| 56 | - uses: actions-rs/cargo@v1 |
| 57 | with: |
| 58 | command: test |
| 59 | args: --doc |
| 60 | |
| 61 | test-msrv: |
| 62 | name: msrv Test Suite |
| 63 | runs-on: ubuntu-latest |
| 64 | strategy: |
| 65 | matrix: |
| 66 | rust: |
| 67 | - 1.56.0 |
| 68 | steps: |
| 69 | - uses: actions/checkout@v1 |
| 70 | - uses: actions-rs/toolchain@v1 |
| 71 | with: |
| 72 | toolchain: ${{ matrix.rust }} |
| 73 | override: true |
| 74 | - uses: Swatinem/rust-cache@v1 |
| 75 | - uses: actions-rs/cargo@v1 |
| 76 | with: |
| 77 | command: test |
| 78 | - uses: actions-rs/cargo@v1 |
| 79 | with: |
| 80 | command: test |
| 81 | args: --no-default-features |
| 82 | |
| 83 | fmt: |
| 84 | name: Rustfmt |
| 85 | runs-on: ubuntu-latest |
| 86 | strategy: |
| 87 | matrix: |
| 88 | rust: |
| 89 | - stable |
| 90 | - 1.56.0 |
| 91 | steps: |
| 92 | - uses: actions/checkout@v1 |
| 93 | - uses: actions-rs/toolchain@v1 |
| 94 | with: |
| 95 | toolchain: ${{ matrix.rust }} |
| 96 | override: true |
| 97 | - run: rustup component add rustfmt |
| 98 | - uses: actions-rs/cargo@v1 |
| 99 | with: |
| 100 | command: fmt |
| 101 | args: --all -- --check |
| 102 | |
| 103 | clippy: |
| 104 | name: Clippy |
| 105 | runs-on: ubuntu-latest |
| 106 | strategy: |
| 107 | matrix: |
| 108 | rust: |
| 109 | - stable |
| 110 | steps: |
| 111 | - uses: actions/checkout@v1 |
| 112 | - uses: actions-rs/toolchain@v1 |
| 113 | with: |
| 114 | toolchain: ${{ matrix.rust }} |
| 115 | override: true |
| 116 | - run: rustup component add clippy |
| 117 | - uses: actions-rs/cargo@v1 |
| 118 | with: |
| 119 | command: clippy |
| 120 | args: -- -D warnings |