Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pipeline

on:
pull_request:
push:
branches:
- master

env:
DOTNET_VERSION: '10.0.x'

jobs:

pipeline:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
cache: true
cache-dependency-path: '**/packages.lock.json'
- name: Execute NUKE
run: ./build.cmd UploadCodecov PushNuGet PushMyGet
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MYGET_API_KEY: ${{ secrets.MYGET_API_KEY }}
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<GenerateAssemblyInformationalVersionAttribute>false</GenerateAssemblyInformationalVersionAttribute>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<!-- .NET Standard 2.0 defaults to C# 7.3 which does not support nullable types -->
Expand Down
47 changes: 20 additions & 27 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,34 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="AwesomeAssertions" Version="9.3.0" />
<PackageVersion Include="AwesomeAssertions.Analyzers" Version="9.0.8" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="1.2.39" />
<PackageVersion Include="EntityFramework" Version="6.5.1" />
<PackageVersion Include="FluentAssertions" Version="7.0.0" />
<PackageVersion Include="LinqKit.Core" Version="1.2.7" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="LinqKit.Core" Version="1.2.9" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="SourceGear.sqlite3" Version="3.50.4.5" />
<PackageVersion Include="SQLite.CodeFirst" Version="1.7.0.36" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Include="System.Data.SQLite" Version="1.0.119" />
<PackageVersion Include="System.Data.SQLite.EF6" Version="1.0.119" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[6,7)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[6,7)" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<PackageVersion Include="System.Data.SQLite" Version="2.0.2" />
<PackageVersion Include="System.Data.SQLite.EF6" Version="2.0.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="xunit.v3" Version="3.2.1" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[8,9)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[8,9)" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="[8.0.1,9)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[9,10)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[9,10)" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="[9,10)" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="[10,11)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[10,11)" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="[10,11)" />
</ItemGroup>
</Project>
</Project>
10 changes: 9 additions & 1 deletion LinqBuilder.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
Directory.Build.props = Directory.Build.props
GitVersion.yml = GitVersion.yml
LICENSE.txt = LICENSE.txt
Expand Down Expand Up @@ -45,6 +44,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EFCore", "EFCore", "{865F6F
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{11A7E48F-5E13-4957-B055-8A6EB24FE6C6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{8CEF6E2B-5E8D-4507-87FE-99E6947A4F00}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{08A85FAA-0A55-4B84-A4ED-7447B6AB85A3}"
ProjectSection(SolutionItems) = preProject
.github\workflows\pipeline.yml = .github\workflows\pipeline.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -91,6 +97,8 @@ Global
{318A1093-3885-4E30-BF3D-F7D331F4A626} = {BAF26E71-25FB-4E1C-ADF2-E9F8C2E78661}
{C496F944-92FD-410D-ABB1-019F640D6C79} = {865F6FAD-36D3-4675-9191-3AEBF9E717B2}
{3E0B788B-2B01-4F27-B2FD-12FAEDD8C88A} = {865F6FAD-36D3-4675-9191-3AEBF9E717B2}
{8CEF6E2B-5E8D-4507-87FE-99E6947A4F00} = {E9CE7133-E0CC-469B-81F9-529EE0AE003D}
{08A85FAA-0A55-4B84-A4ED-7447B6AB85A3} = {8CEF6E2B-5E8D-4507-87FE-99E6947A4F00}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4029E7C4-F013-4A5C-A3A7-9BD01FA6ED4A}
Expand Down
33 changes: 0 additions & 33 deletions appveyor.yml

This file was deleted.

2 changes: 2 additions & 0 deletions build/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ csharp_style_expression_bodied_methods = true:silent
csharp_style_expression_bodied_properties = true:warning
csharp_style_expression_bodied_indexers = true:warning
csharp_style_expression_bodied_accessors = true:warning

resharper_all_underscore_local_parameter_name_highlighting = none
1 change: 1 addition & 0 deletions build/.globalconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet_diagnostic.CA1050.severity = none
34 changes: 16 additions & 18 deletions build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Nuke.Common;
using Nuke.Common.CI;
using Nuke.Common.CI.AppVeyor;
using Nuke.Common.CI.GitHubActions;
using Nuke.Common.Git;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
Expand All @@ -20,20 +21,7 @@
using static Nuke.Common.Tools.NuGet.NuGetTasks;
using static Nuke.Common.Tools.ReportGenerator.ReportGeneratorTasks;

// ReSharper disable AllUnderscoreLocalParameterName

[ShutdownDotNetAfterServerBuild]
[AppVeyor(
AppVeyorImage.VisualStudio2022,
InvokedTargets =
[
nameof(UploadCodecov),
nameof(PushNuGet),
nameof(PushMyGet),
])]
[AppVeyorSecret("MYGET_API_KEY", "78qy8e6pKfJlQV7RAG5tJOWegzXpjASkUs3aFdVBoPYA5gi6+mWdjbuAmNa5OQPe")]
[AppVeyorSecret("NUGET_API_KEY", "aMbj+EdePo74elFCi6lrQZcO81mru5j8cqD5FxGoDBWgXFFHwok/z4B+BtS4H1Sw")]
[AppVeyorSecret("CODECOV_TOKEN", "3FxtGPNTgZyQGToJBaH68/oIjptV79CcViR9mHt2aOKGh3++oKTehBIuPSb7oYCE")]
[SuppressMessage("ReSharper", "UnusedMember.Local")]
class Build : NukeBuild
{
public static int Main () => Execute<Build>(x => x.Compile);
Expand All @@ -48,7 +36,7 @@ class Build : NukeBuild
[Solution] readonly Solution Solution;
[GitRepository] readonly GitRepository GitRepository;
[GitVersion] readonly GitVersion GitVersion;
[CI] readonly AppVeyor AppVeyor;
[CI] readonly GitHubActions GitHubActions;

static AbsolutePath SourceDirectory => RootDirectory / "src";
static AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
Expand All @@ -70,7 +58,16 @@ class Build : NukeBuild
ArtifactsDirectory.CreateOrCleanDirectory();
});

Target Restore => _ => _
.Executes(() =>
{
DotNetRestore(s => s
.SetProjectFile(Solution)
.EnableLockedMode());
});

Target Compile => _ => _
.DependsOn(Restore)
.Executes(() =>
{
DotNetBuild(s => s
Expand All @@ -79,7 +76,8 @@ class Build : NukeBuild
.SetAssemblyVersion(GitVersion.AssemblySemVer)
.SetFileVersion(GitVersion.AssemblySemFileVer)
.SetInformationalVersion(GitVersion.InformationalVersion)
.EnableTreatWarningsAsErrors());
.EnableTreatWarningsAsErrors()
.EnableNoRestore());
});

Target Test => _ => _
Expand Down Expand Up @@ -142,7 +140,7 @@ class Build : NukeBuild

Target PushNuGet => _ => _
.DependsOn(Package)
.OnlyWhenStatic(() => IsServerBuild && AppVeyor.RepositoryTag)
.OnlyWhenStatic(() => IsServerBuild && GitHubActions.RefType == "tag")
.Executes(() =>
{
NuGetPush(s => s
Expand Down
4 changes: 2 additions & 2 deletions build/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[TypeConverter(typeof(TypeConverter<Configuration>))]
public class Configuration : Enumeration
{
public static Configuration Debug = new() { Value = nameof(Debug) };
public static Configuration Release = new() { Value = nameof(Release) };
public static readonly Configuration Debug = new() { Value = nameof(Debug) };
public static readonly Configuration Release = new() { Value = nameof(Release) };

public static implicit operator string(Configuration configuration)
{
Expand Down
10 changes: 5 additions & 5 deletions build/_build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -13,11 +13,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nuke.Common" Version="9.0.3" />
<PackageReference Include="Nuke.Common" Version="10.1.0" />
<PackageDownload Include="CodecovUploader" Version="[0.8.0]" />
<PackageDownload Include="GitVersion.Tool" Version="[6.1.0]" />
<PackageDownload Include="NuGet.CommandLine" Version="[6.12.2]" />
<PackageDownload Include="ReportGenerator" Version="[5.4.3]" />
<PackageDownload Include="GitVersion.Tool" Version="[6.5.1]" />
<PackageDownload Include="NuGet.CommandLine" Version="[7.0.1]" />
<PackageDownload Include="ReportGenerator" Version="[5.5.1]" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions build/_build.csproj.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=VariableHidesOuterVariable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ClassNeverInstantiated_002EGlobal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MemberCanBeMadeStatic_002ELocal/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=InterpolatedStringExpressionIsNotIFormattable/@EntryIndexedValue">DO_NOT_SHOW</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Implicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_PRIVATE_MODIFIER/@EntryValue">Implicit</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">ExpressionBody</s:String>
Expand All @@ -16,8 +17,8 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using FluentAssertions;
using AwesomeAssertions;
using LinqBuilder.EF6.Tests.Data;
using Xunit;

Expand Down
4 changes: 2 additions & 2 deletions src/EF6/LinqBuilder.EF6.Tests/IntegrationTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Data.Entity;
using System.Threading.Tasks;
using FluentAssertions;
using AwesomeAssertions;
using LinqBuilder.EF6.Tests.Data;
using LinqBuilder.EF6.Tests.Data.Specifications;
using LinqBuilder.OrderBy;
Expand Down Expand Up @@ -38,7 +38,7 @@ public async Task ExeSpecAsync_ChildSpecification_ShouldReturnCorrectResult()
.ExeSpec(specification)
.ToListAsync();

result.Count.Should().Be(2);
result.Should().HaveCount(2);
result[0].Id.Should().Be(1);
result[1].Id.Should().Be(3);
}
Expand Down
12 changes: 9 additions & 3 deletions src/EF6/LinqBuilder.EF6.Tests/LinqBuilder.EF6.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AwesomeAssertions" />
<PackageReference Include="AwesomeAssertions.Analyzers">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="EntityFramework" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="SourceGear.sqlite3" />
<PackageReference Include="SQLite.CodeFirst" />
<PackageReference Include="System.Data.SQLite" />
<PackageReference Include="System.Data.SQLite.EF6" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.v3" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading