| |
| name: CI |
| on: [push, pull_request] |
| jobs: |
| test: |
| name: Test |
| runs-on: ubuntu-latest |
| strategy: |
| fail-fast: false |
| matrix: |
| rust: [1.39.0, stable, beta, nightly] |
| steps: |
| - name: Checkout |
| uses: actions/checkout@v2 |
| - name: Install rust |
| uses: actions-rs/toolchain@v1 |
| with: |
| toolchain: ${{ matrix.rust }} |
| profile: minimal |
| override: true |
| - uses: actions-rs/cargo@v1 |
| with: |
| command: test |
| - if: matrix.rust == 'nightly' |
| uses: actions-rs/cargo@v1 |
| with: |
| command: test |
| args: --features nightly |
| |
| fmt: |
| name: Rustfmt |
| runs-on: ubuntu-latest |
| steps: |
| - uses: actions/checkout@v2 |
| - uses: actions-rs/toolchain@v1 |
| with: |
| profile: minimal |
| toolchain: stable |
| override: true |
| - run: rustup component add rustfmt |
| - uses: actions-rs/cargo@v1 |
| with: |
| command: fmt |
| args: -- --check |