name: CI
on:
  pull_request:
  push:
    branches:
      - master

jobs:
  test:
    name: Test ${{ matrix.rust }}
    strategy:
      matrix:
        rust:
          - stable
          - beta
          - nightly
          - 1.31.0

    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v1

      - name: Install Rust (${{ matrix.rust }})
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true

      - name: Test
        uses: actions-rs/cargo@v1
        with:
          command: test
