Merge pull request #3 from Llywelwyn/ci-github-action

Create dotnet-build-test.yml
This commit is contained in:
Llywelwyn 2022-07-25 19:16:54 +01:00 committed by GitHub
commit cbb8cdff65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

26
.github/workflows/dotnet-build-test.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: ci build and test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
env:
Solution_Name: CharacterRecordsGenerator.sln
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Add MSBuild to path
uses: microsoft/setup-msbuild@v1.1
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
- name: Restore nuget
run: nuget restore $env:Solution_Name
- name: Build
run: msbuild $env:Solution_Name /t:Rebuild -property:Configuration=Release
- name: Unit tests
run: dotnet test --no-build --verbosity normal