-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.36 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test
on:
workflow_dispatch: {}
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DOTNET_VERSION: '8.0.x'
SOLUTION_PATH: ./Zus.sln
jobs:
unit-test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore ${{ env.SOLUTION_PATH }}
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Test
run: |
git config --global --add safe.directory '*'
dotnet test ${{ env.SOLUTION_PATH }} --no-restore --logger "trx;LogFileName=test-results.trx" || true
- name: Test Report
uses: dorny/test-reporter@v1
with:
name: Test Results
path: "**/test-results.trx"
reporter: dotnet-trx
fail-on-error: true
stryker:
name: Stryker
needs: unit-test
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
uses: ./.github/workflows/stryker.yml
secrets: inherit
with:
solution_path: ./Zus.sln
dotnet_version: '8.0.x'