1 2name: CI 3on: [push, pull_request] 4jobs: 5 test: 6 name: Test 7 runs-on: ubuntu-latest 8 strategy: 9 fail-fast: false 10 matrix: 11 rust: [1.39.0, stable, beta, nightly] 12 steps: 13 - name: Checkout 14 uses: actions/checkout@v2 15 - name: Install rust 16 uses: actions-rs/toolchain@v1 17 with: 18 toolchain: ${{ matrix.rust }} 19 profile: minimal 20 override: true 21 - uses: actions-rs/cargo@v1 22 with: 23 command: test 24 - if: matrix.rust == 'nightly' 25 uses: actions-rs/cargo@v1 26 with: 27 command: test 28 args: --features nightly 29 30 fmt: 31 name: Rustfmt 32 runs-on: ubuntu-latest 33 steps: 34 - uses: actions/checkout@v2 35 - uses: actions-rs/toolchain@v1 36 with: 37 profile: minimal 38 toolchain: stable 39 override: true 40 - run: rustup component add rustfmt 41 - uses: actions-rs/cargo@v1 42 with: 43 command: fmt 44 args: -- --check 45