Skip to content

Commit 7aefa3d

Browse files
authored
Merge pull request #9 from DbUp/release/6.0.0
Release 6.0.0
2 parents d2c9014 + 17b8fd0 commit 7aefa3d

29 files changed

+267
-456
lines changed

.github/workflows/main.yml

+4-69
Original file line numberDiff line numberDiff line change
@@ -2,77 +2,12 @@ name: CI
22

33
on:
44
push:
5+
branches:
6+
- '**' # Ignores pushes of tags
57
pull_request:
68
workflow_dispatch:
79

810
jobs:
911
build:
10-
runs-on: windows-latest # Use Ubuntu in v5.0
11-
12-
env:
13-
DOTNET_NOLOGO: true
14-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache
15-
16-
steps:
17-
- uses: actions/checkout@v3
18-
with:
19-
fetch-depth: 0 # all
20-
21-
- name: Setup .NET 2.0 # Remove in v5.0
22-
uses: actions/setup-dotnet@v1
23-
with:
24-
dotnet-version: 2.0.x
25-
26-
- name: Setup .NET 8.0
27-
uses: actions/setup-dotnet@v1
28-
with:
29-
dotnet-version: 8.0.x
30-
31-
- name: Install GitVersion
32-
uses: gittools/actions/gitversion/setup@v0
33-
with:
34-
versionSpec: '5.x'
35-
36-
- name: Run GitVersion
37-
id: gitversion
38-
uses: gittools/actions/gitversion/execute@v0
39-
40-
- name: Display SemVer
41-
run: |
42-
echo "SemVer: $env:GitVersion_SemVer"
43-
44-
- name: Add DbUp NuGet Source
45-
run: dotnet nuget add source --name DbUp --username DbUp --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text https://nuget.pkg.github.com/DbUp/index.json
46-
47-
- name: Restore
48-
run: dotnet restore
49-
working-directory: src
50-
51-
- name: Build
52-
run: dotnet build -c Release --no-restore /p:Version=$env:GitVersion_SemVer
53-
working-directory: src
54-
55-
- name: Test
56-
run: dotnet test --no-build -c Release --logger trx --logger "console;verbosity=detailed" --results-directory ../artifacts
57-
working-directory: src
58-
59-
- name: Pack
60-
run: dotnet pack --no-build -c Release -o ../artifacts /p:Version=$env:GitVersion_SemVer
61-
working-directory: src
62-
63-
- name: Push NuGet packages to GitHub Packages ⬆️
64-
working-directory: artifacts
65-
run: dotnet nuget push *.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://nuget.pkg.github.com/DbUp/index.json"
66-
67-
- name: Push NuGet packages to NuGet ⬆️
68-
if: ${{ steps.gitversion.outputs.preReleaseLabel == '' }}
69-
working-directory: artifacts
70-
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json
71-
72-
- name: Test Report 🧪
73-
uses: dorny/test-reporter@v1
74-
if: ${{ always() }}
75-
with:
76-
name: Tests
77-
path: artifacts/*.trx
78-
reporter: dotnet-trx
12+
name: Build
13+
uses: DbUp/Universe/.github/workflows/build.yml@main

.github/workflows/publish-release.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Publish DbUp Packages to NuGet
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
name: Publish Package
11+
uses: DbUp/Universe/.github/workflows/publish-release.yml@main
12+
secrets: inherit

.github/workflows/test-report.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Test Report
2+
run-name: Generate Test Report for run `${{ github.event.workflow_run.run_number }}` branch `${{ github.event.workflow_run.head_branch }}`
3+
4+
on:
5+
workflow_run:
6+
workflows: ["CI", "build"]
7+
types: [completed]
8+
9+
jobs:
10+
report:
11+
name: Test Report 🧪
12+
uses: DbUp/Universe/.github/workflows/test-report.yml@main

src/Directory.Build.props

-14
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,4 @@
1010
<LangVersion>latest</LangVersion>
1111
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1212
</PropertyGroup>
13-
14-
<PropertyGroup Condition="'$(TF_BUILD)' == 'true' Or '$(CI)' == 'true'">
15-
16-
<!-- Perform a deterministic build, so our binaries aren't impacted by build server environmental factors (e.g. file paths). -->
17-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
18-
19-
<!-- Embed source files that are not tracked by the source control manager in the PDB -->
20-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
21-
22-
<!-- Recommended: Embed symbols containing Source Link in the main file (exe/dll) -->
23-
<DebugType>embedded</DebugType>
24-
25-
</PropertyGroup>
26-
2713
</Project>

src/Sample/Program.cs

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
2+
using Microsoft.Data.Sqlite;
23

3-
namespace SQLiteSampleApplication
4+
namespace SqliteSampleApplication
45
{
56
public static class Program
67
{
@@ -13,11 +14,11 @@ static void Main()
1314

1415
static void InMemoryDb()
1516
{
16-
using (var database = new DbUp.SQLite.Helpers.InMemorySQLiteDatabase())
17+
using (var database = new DbUp.Sqlite.Helpers.InMemorySqliteDatabase())
1718
{
1819
var upgrader =
1920
DbUp.DeployChanges.To
20-
.SQLiteDatabase(database.ConnectionString)
21+
.SqliteDatabase(database.ConnectionString)
2122
.WithScriptsEmbeddedInAssembly(System.Reflection.Assembly.GetExecutingAssembly())
2223
.LogToConsole()
2324
.Build();
@@ -34,11 +35,11 @@ static void InMemoryDb()
3435

3536
static void TemporaryFileDb()
3637
{
37-
using (var database = new DbUp.SQLite.Helpers.TemporarySQLiteDatabase("test.db"))
38+
using (var database = new DbUp.Sqlite.Helpers.TemporarySqliteDatabase("test.db"))
3839
{
3940
var upgrader =
4041
DbUp.DeployChanges.To
41-
.SQLiteDatabase(database.SharedConnection)
42+
.SqliteDatabase(database.SharedConnection)
4243
.WithScriptsEmbeddedInAssembly(System.Reflection.Assembly.GetExecutingAssembly())
4344
.LogToConsole()
4445
.Build();
@@ -55,13 +56,13 @@ static void TemporaryFileDb()
5556

5657
static void PermanentFileDb()
5758
{
58-
Microsoft.Data.Sqlite.SqliteConnection connection = new("Data Source=dbup.db");
59+
SqliteConnection connection = new("Data Source=dbup.db");
5960

60-
using (var database = new DbUp.SQLite.Helpers.SharedConnection(connection))
61+
using (var database = new DbUp.Sqlite.Helpers.SharedConnection(connection))
6162
{
6263
var upgrader = DbUp.DeployChanges
6364
.To
64-
.SQLiteDatabase(connection.ConnectionString)
65+
.SqliteDatabase(connection.ConnectionString)
6566
.WithScriptsEmbeddedInAssembly(System.Reflection.Assembly.GetExecutingAssembly())
6667
.LogToConsole()
6768
.Build();
@@ -87,15 +88,17 @@ static void Display(string dbType, DbUp.Engine.DatabaseUpgradeResult result, Tim
8788
"{0} Database Upgrade Runtime: {1}",
8889
dbType,
8990
string.Format("{0:00}:{1:00}:{2:00}.{3:00}", ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10));
91+
Console.WriteLine("Press any key to continue...");
9092
Console.ReadKey();
9193
}
9294
else
9395
{
9496
Console.ForegroundColor = ConsoleColor.Red;
9597
Console.WriteLine(result.Error);
98+
Console.WriteLine("Press any key to continue...");
9699
Console.ReadKey();
97100
Console.WriteLine("Failed!");
98101
}
99102
}
100103
}
101-
}
104+
}

src/Sample/Sample.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFramework>net8</TargetFramework>
44
<OutputType>Exe</OutputType>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<ProjectReference Include="..\dbup-sqlite\dbup-sqlite.csproj"/>
10+
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.0" />
1011
</ItemGroup>
1112

1213
<ItemGroup>

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyBasicSupport.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'SchemaVersions'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'SchemaVersions'
1010
DB Operation: Dispose command
1111
Info: Creating the [SchemaVersions] table

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyJournalCreationIfNameChanged.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'TestSchemaVersions'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'TestSchemaVersions'
1010
DB Operation: Dispose command
1111
Info: Creating the [TestSchemaVersions] table

src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.verified.txt src/Tests/ApprovalFiles/DatabaseSupportTests.VerifyVariableSubstitutions.approved.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
DB Operation: Open connection
22
Info: Beginning database upgrade
3-
Info: Checking whether journal table exists..
3+
Info: Checking whether journal table exists
44
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'SchemaVersions'
55
DB Operation: Dispose command
66
Info: Journal table does not exist
77
Info: Executing Database Server script 'Script0001.sql'
8-
Info: Checking whether journal table exists..
8+
Info: Checking whether journal table exists
99
DB Operation: Execute scalar command: SELECT count(name) FROM sqlite_master WHERE type = 'table' AND name = 'SchemaVersions'
1010
DB Operation: Dispose command
1111
Info: Creating the [SchemaVersions] table

src/Tests/ApprovalFiles/NoPublicApiChanges.Run.DotNet.verified.cs

-77
This file was deleted.

0 commit comments

Comments
 (0)