-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (60 loc) · 1.95 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 6'
workflow_dispatch:
jobs:
Test:
runs-on: ubuntu-20.04
steps:
- name: Install GitVersion
uses: GitTools/actions/gitversion/setup@v0.9.11
with:
versionSpec: '5.5.0'
- name: Setup .NET Core SDK '3.1.x'
uses: actions/setup-dotnet@v2
with:
dotnet-version: '3.1.x'
include-prerelease: true
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run GitVersion
id: gitversion
uses: GitTools/actions/gitversion/execute@v0.9.11
- name: Echo version
run: echo ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Setup .NET Core SDK '9.x.x'
uses: actions/setup-dotnet@v2
with:
dotnet-version: '9.x.x'
include-prerelease: true
- name: Update project version
uses: roryprimrose/set-vs-sdk-project-version@v1
with:
version: ${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Display dotnet version
run: dotnet --version
- name: Install Dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test with dotnet
run: dotnet test --no-restore --verbosity normal --logger trx --results-directory "TestResults"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: Tests # Name of the check run which will be created
path: TestResults/*.trx # Path to test results
reporter: dotnet-trx # Format of test results