Skip to content

Commit 16459d3

Browse files
committed
build: add github actions
Signed-off-by: Adrien Barreau <[email protected]>
1 parent 84db65a commit 16459d3

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build-and-test.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# From https://learn.microsoft.com/en-us/dotnet/devops/dotnet-test-github-action
2+
name: build and test
3+
4+
on:
5+
push:
6+
pull_request:
7+
branches: [ master ]
8+
paths:
9+
- '**.cs'
10+
- '**.csproj'
11+
12+
env:
13+
DOTNET_VERSION: '6.0.401' # The .NET SDK version to use
14+
15+
jobs:
16+
build-and-test:
17+
18+
name: build-and-test-${{matrix.os}}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest]
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
- name: Setup .NET Core
27+
uses: actions/setup-dotnet@v3
28+
with:
29+
dotnet-version: ${{ env.DOTNET_VERSION }}
30+
31+
- name: Install dependencies
32+
run: dotnet restore
33+
34+
- name: Build
35+
run: dotnet build --configuration Release --no-restore
36+
37+
- name: Test
38+
run: dotnet test --no-restore --verbosity normal

0 commit comments

Comments
 (0)