name: Build & Test
on:
  push:
    branches: [ main, vnext ]
    paths: 
      - 'src/**'
      - 'test/**' 
      - '!**/*.md'
  pull_request:
    branches: [ main, vnext ]
    paths: 
      - 'src/**'
      - 'test/**' 
      - '!**/*.md'
  workflow_dispatch:
jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os:  [ windows-latest, macos-latest ]
    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '8.0.x'
        include-prerelease: true
    - name: Restore dependencies
      run: dotnet restore     
    - name: Build
      run: dotnet build --no-restore
    - name: Test
      run: dotnet test --no-build --verbosity normal
