Skip to content

Instantly share code, notes, and snippets.

@felipetofoli
Created May 26, 2021 23:09
Show Gist options
  • Save felipetofoli/f94ec0edfe074220c5448d9cc9671b09 to your computer and use it in GitHub Desktop.
Save felipetofoli/f94ec0edfe074220c5448d9cc9671b09 to your computer and use it in GitHub Desktop.
GitHub Actions for .Net Full Framework: Build & Test
name: Build and Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
- name: Setup VSTest
uses: darenm/Setup-VSTest@v1
- name: Navigate to Workspace
run: cd $GITHUB_WORKSPACE
- name: Restore Packages
run: nuget restore Sandbox.sln
- name: Build Solution
run: |
msbuild.exe Sandbox.sln /p:platform="Any CPU" /p:configuration="Release"
- name: Run Tests
run: vstest.console.exe .\tests\Sandbox.Tests\bin\Release\Sandbox.Tests.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment