Repository navigation
78 lines (75 loc) · 2.77 KB
/
Copy pathdotnet.yml
File metadata and controls
78 lines (75 loc) · 2.77 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
name: Build and Test
on:
push:
branches: ['main']
paths-ignore:
- '*.md'
pull_request:
branches: ['main']
paths-ignore:
- '*.md'
jobs:
web:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '22'
- name: Enable Corepack
run: corepack enable
- name: Install workspace dependencies
run: yarn install --immutable
- name: Check dependencies, lint, formatting, and TypeScript
run: yarn check
- name: Run Vitest unit tests
run: yarn vitest run --project unit
- name: Build dashboard
run: yarn workspace zonetree-analytics-dashboard build
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x
- name: Display dotnet version
run: dotnet --version
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ./src
- name: Test
run: dotnet test --no-build --configuration Release --verbosity normal
working-directory: ./src
- name: Pack
run: |
dotnet pack ZoneTree.Analytics/ZoneTree.Analytics.csproj --configuration Release --no-build --output ../artifacts/packages
dotnet pack ZoneTree.Analytics.AspNetCore/ZoneTree.Analytics.AspNetCore.csproj --configuration Release --no-build --output ../artifacts/packages
working-directory: ./src
- name: Upload packages
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v7
with:
name: nuget-packages
path: artifacts/packages/
- name: Test reporting without reflection serialization
run: >-
dotnet test ZoneTree.Analytics.UnitTests/ZoneTree.Analytics.UnitTests.csproj
--configuration Release --no-restore
-p:JsonSerializerIsReflectionEnabledByDefault=false
--filter "FullyQualifiedName~ReportingSerializationTests|FullyQualifiedName~ReportingApiServesWebReports|FullyQualifiedName~ReportingApiRunsQueriesAndFunnels|FullyQualifiedName~ReportingApiSerializationFailure|FullyQualifiedName~ReportingApiCancelledSerialization|FullyQualifiedName~AspNetCoreHardeningTests|FullyQualifiedName~AspNetCoreHostingTests|FullyQualifiedName~AnalyticsWebOptionValidationTests"
--verbosity minimal
working-directory: ./src