Skip to content

Commit

Permalink
Add .Net 9.0 as target framework
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonGraal committed Jan 13, 2025
1 parent 14ded65 commit ad07168
Show file tree
Hide file tree
Showing 17 changed files with 28 additions and 30 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ["8.0.x"]
dotnet-version: ["8.0", "9.0"]
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}
dotnet-version: ${{ matrix.dotnet-version }}.x
- name: Install tools
run: |
dotnet tool restore --tool-manifest .config/dotnet-tools-ci.json
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
run: dotnet build -f net${{ matrix.dotnet-version }}
- name: Tests with Coverage
run: >
dotnet coverage collect -o ${{ github.workspace }}/coverage/Coverage-${{ matrix.dotnet-version }}.xml -f cobertura -s coverage.runsettings
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
path: coverage/
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
if: ${{ matrix.dotnet-version == '8.0.x' }}
if: ${{ matrix.dotnet-version == '8.0' }}
with:
path: test/Html

Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
1 change: 1 addition & 0 deletions GqlPlus.sln
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ Global
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{B834B2ED-0D27-4281-8523-B706B42DCC15} = {4E1645F9-6194-4B1F-B93D-5B2CDDE5E6DE}
{DDB8D682-23EA-48C4-A1AD-65F114533202} = {B834B2ED-0D27-4281-8523-B706B42DCC15}
{D97ABCF2-E6C4-4384-AFB7-C55943EBE1E2} = {3B90AC37-1A6B-41AF-8490-E9D48E429ACD}
{B73CDEC7-3F67-444E-8A06-16C20DF56DFB} = {3B90AC37-1A6B-41AF-8490-E9D48E429ACD}
Expand Down
1 change: 0 additions & 1 deletion test/GqlPlus.ComponentTestBase/OperationData.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated from .\test\GqlPlus.ComponentTestBase\Samples\Operation
// Collected from 5e5c83d (HEAD -> main, origin/main, origin/HEAD) 2024-09-24 Merge pull request #3 from graphql-plus/samples


namespace GqlPlus;

public class OperationInvalidData
Expand Down
1 change: 0 additions & 1 deletion test/GqlPlus.ComponentTestBase/SampleData.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated from .\test\GqlPlus.ComponentTestBase\Samples
// Collected from 5e5c83d (HEAD -> main, origin/main, origin/HEAD) 2024-09-24 Merge pull request #3 from graphql-plus/samples


namespace GqlPlus;

public class SampleGraphQlData
Expand Down
1 change: 0 additions & 1 deletion test/GqlPlus.ComponentTestBase/SchemaData.gen.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Generated from .\test\GqlPlus.ComponentTestBase\Samples\Schema
// Collected from 5e5c83d (HEAD -> main, origin/main, origin/HEAD) 2024-09-24 Merge pull request #3 from graphql-plus/samples


namespace GqlPlus;

public class SchemaInvalidGlobalsData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public void Merge_TwoAstsSameOutput_ReturnsExpected(string category)

internal override GroupsMerger<IGqlpSchemaCategory> MergerGroups => _merger;

protected override IGqlpSchemaCategory MakeAliased(string input, string[]? aliases = null, string description = "")
=> new CategoryDeclAst(AstNulls.At, input, description, input) { Aliases = aliases ?? [] };
protected override IGqlpSchemaCategory MakeAliased(string name, string[]? aliases = null, string description = "")
=> new CategoryDeclAst(AstNulls.At, name, description, name) { Aliases = aliases ?? [] };
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ public MergeDirectivesTests(ITestOutputHelper outputHelper)

internal override GroupsMerger<IGqlpSchemaDirective> MergerGroups => _merger;

protected override IGqlpSchemaDirective MakeAliased(string input, string[]? aliases = null, string description = "")
=> new DirectiveDeclAst(AstNulls.At, input, description) { Aliases = aliases ?? [] };
protected override IGqlpSchemaDirective MakeAliased(string name, string[]? aliases = null, string description = "")
=> new DirectiveDeclAst(AstNulls.At, name, description) { Aliases = aliases ?? [] };
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public MergeOptionsTests(ITestOutputHelper outputHelper)

internal override GroupsMerger<IGqlpSchemaOption> MergerGroups => _merger;

protected override IGqlpSchemaOption MakeAliased(string input, string[]? aliases = null, string description = "")
=> new OptionDeclAst(AstNulls.At, input, description) { Aliases = aliases ?? [] };
protected override IGqlpSchemaOption MakeAliased(string name, string[]? aliases = null, string description = "")
=> new OptionDeclAst(AstNulls.At, name, description) { Aliases = aliases ?? [] };
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ ITestOutputHelper outputHelper

internal override AstObjectFieldsMerger<IGqlpDualField> MergerField => _merger;

protected override IGqlpDualField MakeAliased(string input, string[] aliases, string description = "")
=> new DualFieldAst(AstNulls.At, input, description, new DualBaseAst(AstNulls.At, input, description)) {
protected override IGqlpDualField MakeAliased(string name, string[] aliases, string description = "")
=> new DualFieldAst(AstNulls.At, name, description, new DualBaseAst(AstNulls.At, name, description)) {
Aliases = aliases
};
protected override IGqlpDualField MakeField(string name, string type, string fieldDescription = "", string typeDescription = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ protected override IGqlpInputField MakeFieldModifiers(string name)
=> new InputFieldAst(AstNulls.At, name, new InputBaseAst(AstNulls.At, name)) {
Modifiers = TestMods()
};
protected override IGqlpInputField MakeAliased(string input, string[] aliases, string description = "")
=> new InputFieldAst(AstNulls.At, input, description, new InputBaseAst(AstNulls.At, input, description)) {
protected override IGqlpInputField MakeAliased(string name, string[] aliases, string description = "")
=> new InputFieldAst(AstNulls.At, name, description, new InputBaseAst(AstNulls.At, name, description)) {
Aliases = aliases
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public MergeInputParamsTests(ITestOutputHelper outputHelper)

internal override GroupsMerger<IGqlpInputParam> MergerGroups => _merger;

protected override IGqlpInputParam MakeDescribed(string input, string description = "")
=> new InputParamAst(AstNulls.At, new InputBaseAst(AstNulls.At, input, description));
protected override IGqlpInputParam MakeDescribed(string name, string description = "")
=> new InputParamAst(AstNulls.At, new InputBaseAst(AstNulls.At, name, description));
private static InputParamAst MakeDefault(string name, string value)
=> new(AstNulls.At, new InputBaseAst(AstNulls.At, name)) {
DefaultValue = new(value.FieldKey())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ protected override IGqlpOutputField MakeFieldModifiers(string name)
=> new OutputFieldAst(AstNulls.At, name, new OutputBaseAst(AstNulls.At, name)) {
Modifiers = TestMods()
};
protected override IGqlpOutputField MakeAliased(string input, string[] aliases, string description = "")
=> new OutputFieldAst(AstNulls.At, input, description, new OutputBaseAst(AstNulls.At, input, description)) {
protected override IGqlpOutputField MakeAliased(string name, string[] aliases, string description = "")
=> new OutputFieldAst(AstNulls.At, name, description, new OutputBaseAst(AstNulls.At, name, description)) {
Aliases = aliases
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public void Merge_ManyItems_ReturnsItem(string name)

internal override GroupsMerger<IGqlpTypeParam> MergerGroups => _merger;

protected override IGqlpTypeParam MakeDescribed(string input, string description = "")
=> new TypeParamAst(AstNulls.At, input, description);
protected override IGqlpTypeParam MakeDescribed(string name, string description = "")
=> new TypeParamAst(AstNulls.At, name, description);
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public void Merge_TwoAstsSameModifers_ReturnsExpected(string input)
internal abstract AstAlternatesMerger<TObjAlt> MergerAlternate { get; }
internal override GroupsMerger<TObjAlt> MergerGroups => MergerAlternate;

protected override TObjAlt MakeDescribed(string input, string description = "")
=> CheckAlternates.MakeAlternate(input, false, description);
protected override TObjAlt MakeDescribed(string name, string description = "")
=> CheckAlternates.MakeAlternate(name, false, description);
}

internal abstract class CheckAlternatesMerger<TObjAlt, TObjAltAst, TObjBase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ ITestOutputHelper outputHelper

internal override GroupsMerger<IGqlpEnumItem> MergerGroups => _merger;

protected override IGqlpEnumItem MakeAliased(string input, string[]? aliases = null, string description = "")
=> new EnumMemberAst(AstNulls.At, input, description) { Aliases = aliases ?? [] };
protected override IGqlpEnumItem MakeAliased(string name, string[]? aliases = null, string description = "")
=> new EnumMemberAst(AstNulls.At, name, description) { Aliases = aliases ?? [] };
}
4 changes: 2 additions & 2 deletions test/GqlPlus.Parser.ClassTests/Merging/TestTyped.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ public void CanMerge_TwoAstsDifferentParents_ReturnsErrors(string name, string t

protected abstract TType MakeTyped(string name, string[]? aliases = null, string description = "", TParent? parent = default);
protected abstract TParent MakeParent(string parent);
protected override TType MakeAliased(string input, string[]? aliases = null, string description = "")
=> MakeTyped(input, aliases, description);
protected override TType MakeAliased(string name, string[]? aliases = null, string description = "")
=> MakeTyped(name, aliases, description);
}

0 comments on commit ad07168

Please sign in to comment.