forked from teodor-elstad/github-actions-101
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.1 KB
/
hello-dotnet.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
name: "Hello .NET"
on:
workflow_dispatch:
pull_request:
env:
NOTES_TEST_CONF: Notes.Api.Test/Notes.Api.Test.csproj
jobs:
build-test:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: "Setup .NET Core SDK"
uses: actions/setup-dotnet@v2
with:
dotnet-version: "6.0.x"
- name: "Print .NET CLI version"
run: dotnet --version
- name: "Restore tests in Notes.Api.Test"
run: "dotnet restore $NOTES_TEST_CONF"
- name: "Build tests in Notes.Api.Test"
run: "dotnet build --no-restore --configuration Release $NOTES_TEST_CONF"
- name: "Run tests in Notes.Api.Test"
run: "dotnet test \
--no-build \
--configuration Release \
--verbosity normal \
--logger trx \
$NOTES_TEST_CONF"
- name: "Show test results in Notes.Api.Test"
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: test-report
path: Notes.Api.Test/TestResults/*.trx
reporter: dotnet-trx