diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 638f9fef..659168fc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -1,17 +1,25 @@ -name: CI +name: .NET on: push: - branches: - - master + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: - runs-on: [windows-latest] + + runs-on: ubuntu-latest + steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Build DotNET - run: | - cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\" - .\MSBuild.exe $Env:GITHUB_WORKSPACE\ **SLN or project** + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal