-
Notifications
You must be signed in to change notification settings - Fork 28
79 lines (59 loc) · 2.23 KB
/
ci.yml
File metadata and controls
79 lines (59 loc) · 2.23 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
name: build-and-test
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
env:
DOTNET_VERSION: '10.0.x'
jobs:
build-and-test:
name: build-and-test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ManagedCode.Storage.slnx
- name: Restore .NET tools
run: dotnet tool restore
- name: Verify formatting
run: dotnet format ManagedCode.Storage.slnx --verify-no-changes --no-restore
- name: Build
run: dotnet build ManagedCode.Storage.slnx --configuration Release --no-restore
- name: Install Playwright browser
run: dotnet playwright -p Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj install chromium
- name: Test
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --filter "Category!=BrowserStress" --collect:"XPlat Code Coverage"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./**/coverage.cobertura.xml
fail_ci_if_error: false
browser-stress:
name: browser-stress
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore ManagedCode.Storage.slnx
- name: Restore .NET tools
run: dotnet tool restore
- name: Build
run: dotnet build ManagedCode.Storage.slnx --configuration Release --no-restore
- name: Install Playwright browser
run: dotnet playwright -p Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj install chromium
- name: Browser stress test
run: dotnet test Tests/ManagedCode.Storage.Tests/ManagedCode.Storage.Tests.csproj --configuration Release --no-build --verbosity normal --filter "Category=BrowserStress"