-
-
Notifications
You must be signed in to change notification settings - Fork 198
106 lines (81 loc) · 4.2 KB
/
build.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
97
98
99
100
101
102
103
104
105
106
name: Build
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POSTGRESQL_CONNECTION_STRING: Server=localhost;Port=5432;Database=yessql;User Id=root;Password=Password12!;
MYSQL_CONNECTION_STRING: server=localhost;uid=root;pwd=Password12!;database=yessql;
SQLSERVER_2019_CONNECTION_STRING: Server=localhost;Database=tempdb;User Id=sa;Password=Password12!;Encrypt=False;
services:
postgres:
image: postgres:11
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: Password12!
POSTGRES_DB: yessql
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
mysql:
image: mysql:8
ports:
- 3306:3306
env:
MYSQL_DATABASE: yessql
MYSQL_ROOT_PASSWORD: Password12!
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password12!
steps:
- uses: actions/checkout@v3
# Required if the .NET version is not available on the GH Actions images
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
8.0.x
- name: Build
run: dotnet build --configuration Release
- name: Test - Sqlite .NET 8.0
run: dotnet test --configuration Release --filter YesSql.Tests.SqliteTests --no-restore --no-build --framework net8.0
- name: Test - Sqlite .NET 7.0
run: dotnet test --configuration Release --filter YesSql.Tests.SqliteTests --no-restore --no-build --framework net7.0
- name: Test - Sqlite .NET 6.0
run: dotnet test --configuration Release --filter YesSql.Tests.SqliteTests --no-restore --no-build --framework net6.0
- name: Test - PostgresQL .NET 8.0
run: dotnet test --configuration Release --filter YesSql.Tests.PostgreSqlTests --no-restore --no-build --framework net8.0
- name: Test - PostgresQL .NET 7.0
run: dotnet test --configuration Release --filter YesSql.Tests.PostgreSqlTests --no-restore --no-build --framework net7.0
- name: Test - PostgresQL .NET 6.0
run: dotnet test --configuration Release --filter YesSql.Tests.PostgreSqlTests --no-restore --no-build --framework net6.0
- name: Test - MySQL .NET 8.0
run: dotnet test --configuration Release --filter YesSql.Tests.MySqlTests --no-restore --no-build --framework net8.0
- name: Test - MySQL .NET 7.0
run: dotnet test --configuration Release --filter YesSql.Tests.MySqlTests --no-restore --no-build --framework net7.0
- name: Test - MySQL .NET 6.0
run: dotnet test --configuration Release --filter YesSql.Tests.MySqlTests --no-restore --no-build --framework net6.0
- name: Test - SQL Server 2019 .NET 8.0
run: dotnet test --configuration release --filter YesSql.Tests.SqlServer2019Tests --no-restore --no-build --framework net8.0
- name: Test - SQL Server 2019 .NET 7.0
run: dotnet test --configuration release --filter YesSql.Tests.SqlServer2019Tests --no-restore --no-build --framework net7.0
- name: Test - SQL Server 2019 .NET 6.0
run: dotnet test --configuration release --filter YesSql.Tests.SqlServer2019Tests --no-restore --no-build --framework net6.0
- name: Test - PostgresQL Legacy Identity - No Schema
run: dotnet test --configuration release --filter YesSql.Tests.PostgreSqlLegacyIdentityTests --no-restore --no-build --framework net6.0
- name: Test - Sqlite Legacy Identity
run: dotnet test --configuration release --filter YesSql.Tests.SqliteLegacyIdentityTests --no-restore --no-build --framework net6.0
- name: Pack with dotnet
run: dotnet pack --output artifacts --configuration Release --no-restore --no-build -p:PackageVersion=$GITHUB_RUN_NUMBER
- name: Push with dotnet on MyGet
run: dotnet nuget push artifacts/*.nupkg --api-key ${{ secrets.MYGET_API_KEY }} --skip-duplicate --source https://www.myget.org/F/yessql/api/v2/package