forked from rgregg/markdowndeep
-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (30 loc) · 1014 Bytes
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
name: Build and Test
on:
workflow_dispatch:
push:
branches: [ 'main', 'dev', 'feature/*' ]
pull_request:
branches: [ 'main', 'dev' ]
jobs:
build-and-test:
runs-on: ubuntu-latest
env:
solutionName: MarkdownDeep.sln
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: 8.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
- name: Restore dependencies
run: dotnet restore ${{ env.solutionName }}
- name: Build
run: dotnet build ${{ env.solutionName }} --no-restore -c Release /p:UseSharedCompilation=false
- name: Test
run: dotnet test ${{ env.solutionName }} --no-build --verbosity normal -c Release /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=opencover
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2