-
Notifications
You must be signed in to change notification settings - Fork 49
96 lines (96 loc) · 5.39 KB
/
cd.yml
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
name: Esquio Continous Deployment
on:
push:
tags:
- release-* # Push events to release-*
jobs:
build:
env:
BUILD_CONFIG: Release
name: Build
runs-on: ubuntu-latest
services:
sql-server:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password12!
ports:
- 5433:1433
postgres:
image: postgres
ports:
- 5434:5432
env:
POSTGRES_PASSWORD: Password12!
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: Password12!
MYSQL_USER: mysql
MYSQL_PASSWORD: Password12!
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core SDK
uses: actions/[email protected]
with:
dotnet-version: 6.0.201
- name: dotnet build
run: dotnet build Esquio.sln -c $BUILD_CONFIG
- name: dotnet test [UnitTests]
run: dotnet test ./tests/UnitTests/UnitTests.csproj -c $BUILD_CONFIG --no-build
- name: dotnet test [FunctionalTests-SqlServer]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "SqlServer"
Data__ConnectionString: "Server=tcp:localhost,5433;Initial Catalog=Esquio.UI;User Id=sa;Password=Password12!;Encrypt=False"
- name: dotnet test [FunctionalTests-Postgres]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "NpgSql"
Data__ConnectionString: "Host=localhost;Port=5434;Database=Esquio.UI.Tests;User Id=postgres;Password=Password12!"
- name: dotnet test [FunctionalTests-MySql]
run: dotnet test ./tests/FunctionalTests/FunctionalTests.csproj -c $BUILD_CONFIG --no-build
env:
Data__Store: "MySql"
Data__ConnectionString: "Server=localhost;Database=Esquio.UI.Tests;Uid=root;Pwd=Password12!;"
- name: dotnet pack [Esquio]
run: dotnet pack ./src/Esquio/Esquio.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.AspNetCore]
run: dotnet pack ./src/Esquio.AspNetCore/Esquio.AspNetCore.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.AspNetCore.ApplicationInsightProcessor]
run: dotnet pack ./src/Esquio.AspNetCore.ApplicationInsightProcessor/Esquio.AspNetCore.ApplicationInsightProcessor.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.Configuration.Store]
run: dotnet pack ./src/Esquio.Configuration.Store/Esquio.Configuration.Store.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.Http.Store]
run: dotnet pack ./src/Esquio.Http.Store/Esquio.Http.Store.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.Blazor.WebAssembly]
run: dotnet pack ./src/Esquio.Blazor.WebAssembly/Esquio.Blazor.WebAssembly.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.MiniProfiler]
run: dotnet pack ./tools/Esquio.MiniProfiler/Esquio.MiniProfiler.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: dotnet pack [Esquio.Cli]
run: dotnet pack ./tools/Esquio.CliTool/Esquio.CliTool.csproj -c $BUILD_CONFIG --no-build --include-source --include-symbols -o ./artifacts
- name: setup nuget
uses: NuGet/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
with:
nuget-version: latest
- name: Publish Esquio AspNetCore nuget
run: dotnet nuget push ./artifacts/Esquio.AspNetCore.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Esquio nuget
run: dotnet nuget push ./artifacts/Esquio.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Application Insights nuget
run: dotnet nuget push ./artifacts/Esquio.AspNetCore.ApplicationInsightProcessor.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Http Store nuget
run: dotnet nuget push ./artifacts/Esquio.Http.Store.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Configuration Store nuget
run: dotnet nuget push ./artifacts/Esquio.Configuration.Store.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish MiniProfiler nuget
run: dotnet nuget push ./artifacts/Esquio.MiniProfiler.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Cli nuget
run: dotnet nuget push ./artifacts/Esquio.Cli.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish Blazor WebAssembly nuget
run: dotnet nuget push ./artifacts/Esquio.Blazor.WebAssembly.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate