Add a first GitHub action to build PRs and the main branch

(We can add a badge later, and potentially remove the AppVeyor build
if we want.)

Signed-off-by: Jon Skeet <jonskeet@google.com>
This commit is contained in:
Jon Skeet 2020-11-10 13:50:57 +00:00 committed by Jon Skeet
parent c245449647
commit cb5df1ea71
1 changed files with 35 additions and 0 deletions

35
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Build
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-18.04
env:
DOTNET_NOLOGO: true
steps:
- name: Check out our repo
uses: actions/checkout@v2
# We need just the .NET Core 2.1 runtime for testing
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.x
# Build with .NET Core 3.1 SDK
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Build
run: |
dotnet build
dotnet test