Skip to content

Commit 0fb9b99

Browse files
committed
Release v2.3.0
1 parent 6cba225 commit 0fb9b99

File tree

9 files changed

+38
-21
lines changed

9 files changed

+38
-21
lines changed

.github/workflows/dotnet-android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install .NET Core
2828
uses: actions/setup-dotnet@v4
2929
with:
30-
dotnet-version: 9.0.x
30+
dotnet-version: 10.0.x
3131

3232
- name: Restore .NET Workloads
3333
run: dotnet workload restore $App_Project_File
@@ -63,4 +63,4 @@ jobs:
6363
uses: actions/upload-artifact@v4
6464
with:
6565
name: AAB
66-
path: src/Vocup.Android/bin/Release/net9.0-android/org.vocup-Signed.aab
66+
path: src/Vocup.Android/bin/Release/net10.0-android/org.vocup-Signed.aab

.github/workflows/dotnet-windows.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ jobs:
1616
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
1717

1818
env:
19-
Solution_Name: Vocup.sln # Replace with your solution name, i.e. MyWpfApp.sln.
19+
Solution_Name: Vocup.slnx # Replace with your solution name, i.e. MyWpfApp.sln.
2020
App_Project_Directory: src\Vocup.WinForms
2121
App_Project_Name: Vocup.WinForms
22+
Test_Project_Directory: tests\Vocup.UnitTests
2223

2324
steps:
2425
- name: Checkout
@@ -30,20 +31,20 @@ jobs:
3031
- name: Install .NET Core
3132
uses: actions/setup-dotnet@v4
3233
with:
33-
dotnet-version: 9.0.x
34+
dotnet-version: 10.0.x
3435

3536
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
3637
- name: Setup MSBuild.exe
3738
uses: microsoft/setup-msbuild@v2
3839

3940
# Execute all unit tests in the solution
4041
- name: Execute unit tests
41-
run: dotnet test --configuration ${{ matrix.configuration }} --arch x64
42+
run: dotnet test --configuration ${{ matrix.configuration }} --arch x64 $env:Test_Project_Directory
4243

4344
# Restore the application to populate the obj folder with RuntimeIdentifiers
4445
- name: Restore the application
4546
if: matrix.configuration == 'Release'
46-
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=${{ matrix.configuration }}
47+
run: msbuild $env:App_Project_Directory /t:Restore /p:Configuration=${{ matrix.configuration }}
4748

4849
- name: Create MSIX package (x86)
4950
if: matrix.configuration == 'Release'

src/Vocup.Android/MainActivity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using Android.OS;
55
using Avalonia;
66
using Avalonia.Android;
7-
using Avalonia.ReactiveUI;
7+
using ReactiveUI.Avalonia;
88

99
namespace Vocup.Android;
1010

src/Vocup.Android/Vocup.Android.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<TargetFramework>net10.0-android</TargetFramework>
55
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
66
<ApplicationId>org.vocup</ApplicationId>
7-
<ApplicationVersion>3</ApplicationVersion>
8-
<ApplicationDisplayVersion>2.2.1</ApplicationDisplayVersion>
7+
<ApplicationVersion>4</ApplicationVersion>
8+
<ApplicationDisplayVersion>2.3.0</ApplicationDisplayVersion>
99
<AndroidPackageFormat>apk</AndroidPackageFormat>
1010
<AndroidEnableProfiledAot>False</AndroidEnableProfiledAot>
1111
<AndroidUseAapt2>True</AndroidUseAapt2>

src/Vocup.WinForms/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap">
3-
<Identity Name="9961VectorData.Vocup" Publisher="CN=FDFCA12E-D0B5-4F1F-869D-7F97CD35B39E" Version="2.2.1.0" />
3+
<Identity Name="9961VectorData.Vocup" Publisher="CN=FDFCA12E-D0B5-4F1F-869D-7F97CD35B39E" Version="2.3.0.0" />
44
<Properties>
55
<DisplayName>Vocup</DisplayName>
66
<PublisherDisplayName>Daniel Lerch</PublisherDisplayName>

src/Vocup.WinForms/Vocup.WinForms.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<Description>Vocabulary training application</Description>
2222
<Company>VectorData</Company>
2323
<Copyright>Copyright © 2011 Florian Amstutz, © 2018-2025 Daniel Lerch.</Copyright>
24-
<Version>2.2.1</Version>
24+
<Version>2.3.0</Version>
2525
<NeutralLanguage>en</NeutralLanguage>
2626
</PropertyGroup>
2727

src/Vocup/Vocup.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyName>Vocup.Avalonia</AssemblyName>
77
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
88
<Copyright>Copyright © 2011 Florian Amstutz, © 2018-2025 Daniel Lerch.</Copyright>
9-
<Version>2.2.1</Version>
9+
<Version>2.3.0</Version>
1010
</PropertyGroup>
1111

1212

tests/Vocup.UnitTests/BookFileFormat2Tests.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using Avalonia.Platform.Storage;
44
using System;
55
using System.IO;
6+
using System.Runtime.CompilerServices;
67
using System.Threading.Tasks;
78
using Vocup.IO;
89
using Vocup.Models;
@@ -81,7 +82,7 @@ public async Task TestReadVhf1_RandomBase64()
8182
public async Task TestWriteReadVhf1()
8283
{
8384
string tempPath = Path.GetTempPath();
84-
string path = Path.Combine(tempPath, $"Vocup_{nameof(TestWriteReadVhf1)}.vhf");
85+
string path = GetTempFilePath();
8586
string vhrCode = "o5xqm7rdg6y9fecs9ykuuckv";
8687
Book original = GenerateSampleBook();
8788
original.VhrCode = vhrCode;
@@ -119,7 +120,7 @@ public async Task TestWriteReadVhf1()
119120
public async Task TestWriteReadVhf1_PracticeModeMixed()
120121
{
121122
string tempPath = Path.GetTempPath();
122-
string path = Path.Combine(tempPath, $"Vocup_{nameof(TestWriteReadVhf1_PracticeModeMixed)}.vhf");
123+
string path = GetTempFilePath();
123124
string vhrCode = "ina5ucmjup2sbcioxdsrvqsu";
124125
Book original = GenerateSampleBook();
125126
original.PracticeMode = PracticeMode.AskForBothMixed;
@@ -158,7 +159,7 @@ public async Task TestWriteReadVhf1_PracticeModeMixed()
158159
public async Task TestWriteReadVhf1_WithoutResults()
159160
{
160161
string tempPath = Path.GetTempPath();
161-
string path = Path.Combine(tempPath, $"Vocup_{nameof(TestWriteReadVhf1_WithoutResults)}.vhf");
162+
string path = GetTempFilePath();
162163
string vhrCode = "wetwjlvwhspsre4slcb01mwk";
163164
Book original = GenerateSampleBook();
164165
original.VhrCode = vhrCode;
@@ -239,7 +240,7 @@ public async Task TestReadVhf2_UpdateRequired()
239240
public async Task TestWriteReadVhf2()
240241
{
241242
string tempPath = Path.GetTempPath();
242-
string path = Path.Combine(tempPath, $"Vocup_{nameof(TestWriteReadVhf2)}.vhf");
243+
string path = GetTempFilePath();
243244
Book original = GenerateSampleBook();
244245

245246
IStorageFile file;
@@ -274,7 +275,7 @@ public async Task TestWriteReadVhf2()
274275
public async Task TestWriteReadVhf2_WithoutResults()
275276
{
276277
string tempPath = Path.GetTempPath();
277-
string path = Path.Combine(tempPath, $"Vocup_{nameof(TestWriteReadVhf2_WithoutResults)}.vhf");
278+
string path = GetTempFilePath();
278279
Book original = GenerateSampleBook();
279280

280281
IStorageFile file;
@@ -323,4 +324,11 @@ private static Book GenerateSampleBook()
323324
}
324325
return book;
325326
}
327+
328+
private static string GetTempFilePath([CallerMemberName] string? testName = null)
329+
{
330+
ArgumentException.ThrowIfNullOrWhiteSpace(testName);
331+
string tempPath = Path.GetTempPath();
332+
return Path.Combine(tempPath, $"Vocup_{nameof(BookFileFormat2Tests)}_{testName}.vhf");
333+
}
326334
}

tests/Vocup.UnitTests/BookFileFormatTests.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,27 @@
77

88
namespace Vocup.UnitTests;
99

10-
public class BookFileFormatTests : IAsyncDisposable
10+
public class InitializeServicesFixture : IAsyncDisposable
1111
{
1212
private readonly IAsyncDisposable disposable;
13-
14-
public BookFileFormatTests()
13+
public InitializeServicesFixture()
1514
{
1615
disposable = Program.InitializeServices();
1716
}
18-
1917
public ValueTask DisposeAsync()
2018
{
2119
return disposable.DisposeAsync();
2220
}
21+
}
22+
23+
public class BookFileFormatTests : IClassFixture<InitializeServicesFixture>
24+
{
25+
private readonly InitializeServicesFixture fixture;
26+
27+
public BookFileFormatTests(InitializeServicesFixture fixture)
28+
{
29+
this.fixture = fixture;
30+
}
2331

2432
[Fact]
2533
public void TestRead_Empty()

0 commit comments

Comments
 (0)