-
Notifications
You must be signed in to change notification settings - Fork 46
140 lines (127 loc) · 4.5 KB
/
ci.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
checks: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Runtime Tests
run: dotnet test ./Tests/Reqnroll.RuntimeTests/Reqnroll.RuntimeTests.csproj --no-build --verbosity normal -f net6.0
- name: Plugin Tests
run: dotnet test ./Tests/Reqnroll.PluginTests/Reqnroll.PluginTests.csproj --no-build --verbosity normal -f net6.0
- name: Generator Tests
run: dotnet test ./Tests/Reqnroll.GeneratorTests/Reqnroll.GeneratorTests.csproj --no-build --verbosity normal -f net6.0
- name: ExternalData Plugin Tests
run: dotnet test ./Plugins/Reqnroll.ExternalData/Reqnroll.ExternalData.ReqnrollPlugin.UnitTests/Reqnroll.ExternalData.ReqnrollPlugin.UnitTests.csproj --no-build --verbosity normal -f net6.0
specs-xunit:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: xUnit Specs
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj --no-build --verbosity normal -f net6.0 --filter "Category=xUnit&Category=Net60&Category!=requiresMsBuild&Category=quarantaine" --logger "trx;LogFileName=specs-xunit-results.trx"
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: specs-results
path: "**/specs-xunit-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: xUnit Specs
path: "**/specs-xunit-results.trx"
reporter: dotnet-trx
specs-nunit:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: NUnit Specs
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj --no-build --verbosity normal -f net6.0 --filter "Category=NUnit&Category=Net60&Category!=requiresMsBuild&Category=quarantaine" --logger "trx;LogFileName=specs-nunit-results.trx"
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: specs-results
path: "**/specs-nunit-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: NUnit Specs
path: "**/specs-nunit-results.trx"
reporter: dotnet-trx
specs-mstest:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
- name: Set .NET 6 SDK
run: dotnet new globaljson --sdk-version 6.0.418
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: MsTest Specs
run: dotnet test ./Tests/Reqnroll.Specs/Reqnroll.Specs.csproj --no-build --verbosity normal -f net6.0 --filter "Category=MsTest&Category=Net60&Category!=requiresMsBuild&Category=quarantaine" --logger "trx;LogFileName=specs-mstest-results.trx"
- uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: specs-results
path: "**/specs-mstest-results.trx"
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: MsTest Specs
path: "**/specs-mstest-results.trx"
reporter: dotnet-trx