Skip to content

Commit 2da2b0b

Browse files
committed
在发布workflow中添加测试
1 parent 251d49c commit 2da2b0b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/PublishNugetPackage.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Nuget Package
1+
name: Publish Nuget Package
22

33
on:
44
release:
@@ -15,11 +15,19 @@ jobs:
1515
- name: Setup .NET Core SDK
1616
uses: actions/setup-dotnet@v3
1717
with:
18-
dotnet-version: '7.0.x'
18+
dotnet-version: |
19+
3.x
20+
5.x
21+
6.x
22+
7.x
1923
- name: build - main
2024
run: dotnet build -c Release ./src/Cuture.AspNetCore.ResponseCaching/Cuture.AspNetCore.ResponseCaching.csproj
2125
- name: build - redis
2226
run: dotnet build -c Release ./src/Cuture.AspNetCore.ResponseCaching.StackExchange.Redis/Cuture.AspNetCore.ResponseCaching.StackExchange.Redis.csproj
27+
- name: setup test redis
28+
uses: zhulik/redis-action@1.1.0
29+
- name: run test
30+
run: dotnet user-secrets set 'ResponseCache_Test_Redis' '127.0.0.1:6379,allowAdmin=true' -p ./test/ResponseCaching.Test.WebHost/ResponseCaching.Test.WebHost.csproj && dotnet test -c Release
2331
- name: pack
2432
run: dotnet pack -c Release -o ./output --include-symbols
2533
- name: push package

0 commit comments

Comments
 (0)