From ee4e5188f07de8c5ddd099ad44b0ab7eee4ea0f7 Mon Sep 17 00:00:00 2001 From: JoeBussell <96738054+JoeBussell@users.noreply.github.com> Date: Wed, 2 Nov 2022 01:08:36 -0700 Subject: [PATCH] Create dotnet.yml Setting up a GitHub action that will be used to build on PR to main. --- .github/workflows/dotnet.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 00000000..74d74cde --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,34 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + paths: + - '**.cs' + - '**.csproj' + +jobs: + build: + name: build-${{matrix.os}} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 6.0.x + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal