name: eShopOnWeb Build and Test

on: [push, pull_request, workflow_dispatch]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: '6.0.x'
        include-prerelease: true

    - name: Build with dotnet
      run: dotnet build ./eShopOnWeb.sln --configuration Release
    
    - name: Test with dotnet
      run: dotnet test ./eShopOnWeb.sln --configuration Release
