name: CI

on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        os: ["macos-latest", "ubuntu-latest", "windows-latest"]
        rust: ["beta", "stable", "1.31.0"]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v1
      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
            toolchain: ${{ matrix.rust }}
            override: true
      - name: Build the code
        run: cargo build --verbose
      - name: Test the code
        run: cargo test --verbose
