-
Notifications
You must be signed in to change notification settings - Fork 7
76 lines (60 loc) · 2.13 KB
/
build-and-test.yaml
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
name: build-and-test
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
DOTNET_VERSION: "8.0.x"
DOTNET_NOLOGO: true
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore
- name: Build TypedSignalR.Client.Attributes.csproj
run: dotnet build ./src/TypedSignalR.Client.Attributes/TypedSignalR.Client.Attributes.csproj --no-restore
- name: Build TypedSignalR.Client.csproj
run: dotnet build ./src/TypedSignalR.Client/TypedSignalR.Client.csproj --no-restore
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore
- name: Build TypedSignalR.Client.csproj
run: dotnet build ./src/TypedSignalR.Client/TypedSignalR.Client.csproj --no-restore
- name: Test TypedSignalR.Client.Tests.csproj
run: dotnet test ./tests/TypedSignalR.Client.Tests/TypedSignalR.Client.Tests.csproj --no-restore
nuget-test:
name: nuget-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore dependencies
run: dotnet restore
- name: Build TypedSignalR.Client.csproj
run: dotnet build ./src/TypedSignalR.Client/TypedSignalR.Client.csproj --no-restore
- name: Launch test server
run: dotnet run --project ./tests/TypedSignalR.Client.Tests.Server/TypedSignalR.Client.Tests.Server.csproj --no-restore &
- name: Sleep for 10 seconds
run: sleep 10s
shell: bash
- name: Test (NuGet)
run: dotnet test ./tests/TypedSignalR.Client.Tests.NuGet/TypedSignalR.Client.Tests.NuGet.csproj --no-restore