name: Build and run tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build-and-test:

    runs-on: ${{ matrix.os }}
    
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        project: [./]

    steps:
    - uses: actions/checkout@v2
      
    - name: Install stable toolchain
      uses: actions-rs/toolchain@v1
      with:
        toolchain: stable
        override: true  
      
    - name: Build
      uses: actions-rs/cargo@v1
      with: 
        command: build
        args: --all --release --verbose
        
    - name: Run tests
      uses: actions-rs/cargo@v1
      with: 
        command: test
        args: --all --release --verbose










