main.yml
1 # copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md 2 on: [push, pull_request] 3 4 name: CI 5 6 jobs: 7 check: 8 name: Check 9 runs-on: ubuntu-latest 10 steps: 11 - uses: actions/checkout@v2 12 with: 13 submodules: true 14 - uses: actions-rs/toolchain@v1 15 with: 16 profile: minimal 17 toolchain: stable 18 override: true 19 - uses: actions-rs/cargo@v1 20 continue-on-error: false 21 with: 22 command: check 23 24 test: 25 name: Test Suite 26 strategy: 27 matrix: 28 os: [ubuntu-latest, windows-latest, macos-latest] 29 runs-on: ${{ matrix.os }} 30 steps: 31 - uses: actions/checkout@v2 32 with: 33 submodules: true 34 - uses: actions-rs/toolchain@v1 35 with: 36 profile: minimal 37 toolchain: stable 38 override: true 39 - uses: actions-rs/cargo@v1 40 continue-on-error: false 41 with: 42 command: build 43 - uses: actions-rs/cargo@v1 44 continue-on-error: false 45 with: 46 command: test 47 48 49 lints: 50 name: Rust lints 51 runs-on: ubuntu-latest 52 steps: 53 - uses: actions/checkout@v2 54 with: 55 submodules: true 56 - uses: actions-rs/toolchain@v1 57 with: 58 profile: minimal 59 toolchain: stable 60 override: true 61 components: rustfmt, clippy 62 63 - name: Run cargo fmt 64 uses: actions-rs/cargo@v1 65 continue-on-error: false 66 with: 67 command: fmt 68 args: --all -- --check 69 70 - name: Run cargo clippy 71 uses: actions-rs/cargo@v1 72 continue-on-error: false 73 with: 74 command: clippy 75 args: -- --deny warnings