name: continuous integration

on: [push, pull_request]

jobs:

  test:
    name: Test (default)
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
          - beta
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - uses: actions-rs/cargo@v1
        with:
          command: test

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - run: rustup component add clippy
      - uses: actions-rs/cargo@v1
        with:
          command: clippy

Add GitHub Actions CI workflow
Add GitHub Actions CI workflow