-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (135 loc) · 5.16 KB
/
build.yml
File metadata and controls
161 lines (135 loc) · 5.16 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Build
on:
push:
branches: [ main, master ]
pull_request:
branches: [ "*" ]
permissions:
contents: read
jobs:
supported-tfms:
if: github.actor != 'dependabot[bot]'
runs-on: ${{ matrix.os }}
env:
QW_REDACTION_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Redaction/app
QW_TELEMETRY_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Telemetry/app
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
tfm: [net8.0, netstandard2.0]
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Redaction
path: _deps/KeelMatrix.Redaction/app
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Telemetry
path: _deps/KeelMatrix.Telemetry/app
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Bootstrap local dependency feed (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: pwsh -NoProfile -File build/Dev-PackInstallSamples.ps1
- name: Bootstrap local dependency feed (Unix)
if: runner.os != 'Windows'
shell: bash
run: bash build/Dev-PackInstallSamples.sh
- name: Restore
run: dotnet restore KeelMatrix.QueryWatch.sln
- name: Build for ${{ matrix.tfm }}
shell: pwsh
run: |
if ('${{ matrix.tfm }}' -eq 'net8.0') {
dotnet build KeelMatrix.QueryWatch.sln -c Release --no-restore -f net8.0
exit $LASTEXITCODE
}
# netstandard is not directly runnable under dotnet test, so validate the
# supported library assets by building each netstandard target explicitly.
dotnet build ./src/KeelMatrix.QueryWatch/KeelMatrix.QueryWatch.csproj -c Release --no-restore -f netstandard2.0
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
dotnet build ./src/KeelMatrix.QueryWatch.Contracts/KeelMatrix.QueryWatch.Contracts.csproj -c Release --no-restore -f netstandard2.0
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
exit $LASTEXITCODE
# Regular runnable tests across all major OSes.
unit-and-integration:
if: github.actor != 'dependabot[bot]'
needs: supported-tfms
runs-on: ${{ matrix.os }}
env:
QW_REDACTION_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Redaction/app
QW_TELEMETRY_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Telemetry/app
QWATCH__DISABLE_COMPOSE: "1"
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Redaction
path: _deps/KeelMatrix.Redaction/app
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Telemetry
path: _deps/KeelMatrix.Telemetry/app
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Bootstrap local dependency feed (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: pwsh -NoProfile -File build/Dev-PackInstallSamples.ps1
- name: Bootstrap local dependency feed (Unix)
if: runner.os != 'Windows'
shell: bash
run: bash build/Dev-PackInstallSamples.sh
- name: Restore
run: dotnet restore KeelMatrix.QueryWatch.sln
- name: Build
run: dotnet build KeelMatrix.QueryWatch.sln -c Release --no-restore
- name: Test (exclude smoke)
run: >
dotnet test KeelMatrix.QueryWatch.sln -c Release --no-build --framework net8.0
--filter "FullyQualifiedName!~KeelMatrix.QueryWatch.Providers.SmokeTests"
# Provider smoke tests stay isolated because they depend on docker compose.
smoke-tests:
if: github.actor != 'dependabot[bot]'
needs: unit-and-integration
runs-on: ubuntu-latest
timeout-minutes: 20
env:
QW_REDACTION_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Redaction/app
QW_TELEMETRY_REPO_ROOT: ${{ github.workspace }}/_deps/KeelMatrix.Telemetry/app
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Redaction
path: _deps/KeelMatrix.Redaction/app
- uses: actions/checkout@v6
with:
repository: KeelMatrix/Telemetry
path: _deps/KeelMatrix.Telemetry/app
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Bootstrap local dependency feed
shell: bash
run: bash build/Dev-PackInstallSamples.sh
# No manual docker steps needed; tests/Directory.Build.targets handles compose up/down
- name: Run smoke tests
env:
QWATCH__DISABLE_COMPOSE: "0"
run: >
dotnet test tests/KeelMatrix.QueryWatch.Providers.SmokeTests/KeelMatrix.QueryWatch.Providers.SmokeTests.csproj
--configuration Release
--framework net8.0
--filter "FullyQualifiedName~KeelMatrix.QueryWatch.Providers.SmokeTests"