-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·39 lines (32 loc) · 953 Bytes
/
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
name: Test
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
push:
branches:
- dev
jobs:
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore Bannerlord.ExpandedTemplate.sln
- name: Build solution
run: dotnet build Bannerlord.ExpandedTemplate.sln --configuration Release --no-restore
- name: Run unit tests with coverage
run: |
dotnet test --collect:"XPlat Code Coverage" --results-directory ./coverage
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
files: ./coverage/*/coverage.cobertura.xml
fail_ci_if_error: true