-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.31 KB
/
build-test.yaml
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Build and test
on:
push:
branches: [ "master" ]
pull_request:
branches: [ '*' ]
env:
working-directory: Sources
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
dotnet-version: 8.0.x
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
working-directory: ${{ env.working-directory }}
- name: Build
run: dotnet build -c Release --no-restore --verbosity normal
working-directory: ${{ env.working-directory }}
- name: Test
run: dotnet test -c Release --no-build --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
working-directory: ${{ env.working-directory }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Run mutation tests
run: |
dotnet tool restore
dotnet stryker --reporter dashboard
working-directory: ${{ env.working-directory }}
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}