Skip to content

Commit bdc4817

Browse files
authored
Merge pull request #3 from feO2x/dev
2 parents c48752b + c957f83 commit bdc4817

35 files changed

+223
-602
lines changed

.github/workflows/build-and-test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,23 @@ name: Build and Test
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [main, dev]
6+
paths: ['Code/**', 'build-and-test.yml']
67
pull_request:
7-
branches: [ "main" ]
8+
branches: [main, dev]
9+
paths: ['Code/**', 'build-and-test.yml']
810

911
jobs:
1012
build-and-test:
1113

1214
runs-on: ubuntu-latest
1315

1416
steps:
15-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1618
- name: Setup .NET
1719
uses: actions/setup-dotnet@v3
1820
with:
19-
dotnet-version: 7.0.x
21+
dotnet-version: 8.0.x
2022
- name: Restore dependencies
2123
run: dotnet restore ./Code/Light.SharedCore.sln
2224
- name: Build
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release to NuGet
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
dotnetVersion:
9+
description: "The version of .NET to use"
10+
required: false
11+
default: "8.0.x"
12+
13+
jobs:
14+
release-to-nuget:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v3
22+
with:
23+
dotnet-version: ${{ github.event.inputs.dotnetVersion || '8.0.x' }}
24+
- name: Prepare SNK file
25+
env:
26+
LIGHT_SHAREDCORE_SNK: ${{ secrets.LIGHT_SHAREDCORE_SNK }}
27+
run: |
28+
echo $LIGHT_SHAREDCORE_SNK | base64 --decode > ./Code/Light.SharedCore/Light.SharedCore.snk
29+
- name: Create NuGet packages
30+
run: dotnet pack ./Code/Light.SharedCore/Light.SharedCore.csproj -c Release /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=Light.SharedCore.snk /p:ContinuousIntegrationBuild=true
31+
- name: Delete SNK file
32+
run: rm ./Code/Light.SharedCore/Light.SharedCore.snk
33+
- name: Push nupkg package
34+
env:
35+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
36+
run: dotnet nuget push "./Code/Light.SharedCore/bin/Release/Light.SharedCore.*.nupkg" --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json

Code/Light.SharedCore.Tests/Initialization/GenericAsyncFactoryTests.cs

Lines changed: 0 additions & 70 deletions
This file was deleted.

Code/Light.SharedCore.Tests/Light.SharedCore.Tests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
<Import Project="Light.SharedCore.Tests.Local.props" Condition="Exists('Light.SharedCore.Tests.Local.props')" />
44

55
<PropertyGroup>
6-
<TargetFramework Condition="'$(TargetFramework)' == '' AND '$(TargetFrameworks)' == ''">net7.0</TargetFramework>
6+
<TargetFramework Condition="'$(TargetFramework)' == '' AND '$(TargetFrameworks)' == ''">net8.0</TargetFramework>
77
<Nullable>enable</Nullable>
88
<IsPackable>false</IsPackable>
99
</PropertyGroup>
1010

1111
<ItemGroup>
1212
<ProjectReference Include="..\Light.SharedCore\Light.SharedCore.csproj" />
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
14-
<PackageReference Include="xunit" Version="2.4.2" />
15-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" PrivateAssets="all" />
16-
<PackageReference Include="FluentAssertions" Version="6.8.0" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
14+
<PackageReference Include="xunit" Version="2.8.1" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1" PrivateAssets="all" />
16+
<PackageReference Include="FluentAssertions" Version="6.12.0" />
1717
<PackageReference Include="Light.Xunit" Version="1.0.0" />
1818
</ItemGroup>
1919

Code/Light.SharedCore.Tests/Parsing/DecimalParserTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static void CheckNumberAsSpan(ReadOnlySpan<char> text, decimal expectedV
9191

9292
[Theory]
9393
[MemberData(nameof(InvalidNumbers))]
94-
public static void InvalidNumber(string text)
94+
public static void InvalidNumber(string? text)
9595
{
9696
var result = DecimalParser.TryParse(text, out var actualValue);
9797

@@ -102,7 +102,7 @@ public static void InvalidNumber(string text)
102102
#if !NETFRAMEWORK
103103
[Theory]
104104
[MemberData(nameof(InvalidNumbers))]
105-
public static void InvalidNumberAsSpan(string text)
105+
public static void InvalidNumberAsSpan(string? text)
106106
{
107107
var result = DecimalParser.TryParse(text.AsSpan(), out var actualValue);
108108

Code/Light.SharedCore.Tests/Parsing/DoubleParserTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private static void CheckNumberAsSpan(ReadOnlySpan<char> text, double expectedVa
9696

9797
[Theory]
9898
[MemberData(nameof(InvalidNumbers))]
99-
public static void InvalidNumber(string text)
99+
public static void InvalidNumber(string? text)
100100
{
101101
var result = DoubleParser.TryParse(text, out var actualValue);
102102

@@ -107,7 +107,7 @@ public static void InvalidNumber(string text)
107107
#if !NETFRAMEWORK
108108
[Theory]
109109
[MemberData(nameof(InvalidNumbers))]
110-
public static void InvalidNumberAsSpan(string text)
110+
public static void InvalidNumberAsSpan(string? text)
111111
{
112112
var result = DoubleParser.TryParse(text.AsSpan(), out var actualValue);
113113

Code/Light.SharedCore.Tests/Parsing/FloatParserTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private static void CheckNumberAsSpan(ReadOnlySpan<char> text, float expectedVal
9393

9494
[Theory]
9595
[MemberData(nameof(InvalidNumbers))]
96-
public static void InvalidNumber(string text)
96+
public static void InvalidNumber(string? text)
9797
{
9898
var result = FloatParser.TryParse(text, out var actualValue);
9999

@@ -104,7 +104,7 @@ public static void InvalidNumber(string text)
104104
#if !NETFRAMEWORK
105105
[Theory]
106106
[MemberData(nameof(InvalidNumbers))]
107-
public static void InvalidNumberAsSpan(string text)
107+
public static void InvalidNumberAsSpan(string? text)
108108
{
109109
var result = FloatParser.TryParse(text.AsSpan(), out var actualValue);
110110

Code/Light.SharedCore/DataAccessAbstractions/IAsyncReadOnlySession.cs

Lines changed: 0 additions & 16 deletions
This file was deleted.

Code/Light.SharedCore/DataAccessAbstractions/IAsyncSession.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

Code/Light.SharedCore/DataAccessAbstractions/ISession.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)