Skip to content

Commit fbdf855

Browse files
authored
Update readme and workflows (#121)
1 parent 86796c8 commit fbdf855

File tree

12 files changed

+30
-32
lines changed

12 files changed

+30
-32
lines changed

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ jobs:
4242
run: dotnet build --no-restore -c Release -p:Version=$version
4343
- name: Pack solution [Release]
4444
working-directory: src
45-
run: dotnet pack --no-restore -c Release -p:Version=$version -o out
46-
- name: Upload artifacts
45+
run: dotnet pack --no-restore --no-build -c Release -p:Version=$version -o out
46+
- name: Upload Nuget packages as workflow artifacts
4747
uses: actions/upload-artifact@v2
4848
with:
4949
name: Nuget packages

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353
working-directory: src
5454
run: |
5555
dotnet tool install -g dotnet-format --version 5.0.205101 --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json
56+
dotnet format --check --fix-whitespace || (echo "Run 'dotnet format' to fix formatting issues" && exit 1)
5657
dotnet format --check -v diag --fix-style warn --fix-analyzers warn || (echo "Run 'dotnet format' to fix formatting issues" && exit 1)
5758
- name: Build solution [Release]
5859
working-directory: src

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# GraphQL Dotnet Parser
22

3-
**master**<br/>[![Coverage Status](https://coveralls.io/repos/github/graphql-dotnet/parser/badge.svg?branch=master)](https://coveralls.io/github/graphql-dotnet/parser?branch=master)<br/>
4-
**develop**<br/>[![Coverage Status](https://coveralls.io/repos/github/graphql-dotnet/parser/badge.svg?branch=develop)](https://coveralls.io/github/graphql-dotnet/parser?branch=develop)<br/>
5-
6-
<br/>
3+
[![Run unit tests](https://github.com/graphql-dotnet/parser/actions/workflows/test.yml/badge.svg)](https://github.com/graphql-dotnet/parser/actions/workflows/test.yml)
4+
[![Publish preview to GitHub registry](https://github.com/graphql-dotnet/parser/actions/workflows/publish-preview.yml/badge.svg)](https://github.com/graphql-dotnet/parser/actions/workflows/publish-preview.yml)
5+
[![Publish release to Nuget registry](https://github.com/graphql-dotnet/parser/actions/workflows/publish-release.yml/badge.svg)](https://github.com/graphql-dotnet/parser/actions/workflows/publish-release.yml)
6+
[![CodeQL analysis](https://github.com/graphql-dotnet/parser/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/graphql-dotnet/parser/actions/workflows/codeql-analysis.yml)
77

88
[![NuGet](https://img.shields.io/nuget/v/GraphQL-Parser.svg)](https://www.nuget.org/packages/GraphQL-Parser)
99
[![Nuget](https://img.shields.io/nuget/dt/GraphQL-Parser)](https://www.nuget.org/packages/GraphQL-Parser)
@@ -14,10 +14,7 @@
1414

1515
![Size](https://img.shields.io/github/repo-size/graphql-dotnet/parser)
1616

17-
[![Build status](https://github.com/graphql-dotnet/parser/workflows/Publish%20preview%20to%20GitHub%20registry/badge.svg)](https://github.com/graphql-dotnet/parser/actions)
18-
[![Build status](https://github.com/graphql-dotnet/parser/workflows/Publish%20release%20to%20Nuget%20registry/badge.svg)](https://github.com/graphql-dotnet/parser/actions)
19-
[![CodeQL analysis](https://github.com/graphql-dotnet/parser/workflows/CodeQL%20analysis/badge.svg)](https://github.com/graphql-dotnet/parser/actions?query=workflow%3A%22%22CodeQL+analysis%22%22)
20-
17+
[![codecov](https://codecov.io/gh/graphql-dotnet/parser/branch/master/graph/badge.svg?token=GEjwg1by60)](https://codecov.io/gh/graphql-dotnet/parser)
2118
[![Total alerts](https://img.shields.io/lgtm/alerts/g/graphql-dotnet/parser.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/graphql-dotnet/parser/alerts/)
2219
[![Language grade: C#](https://img.shields.io/lgtm/grade/csharp/g/graphql-dotnet/parser.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/graphql-dotnet/parser/context:csharp)
2320

src/GraphQLParser.ApiTests/GraphQLParser.ApiTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
8+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
99
<PackageReference Include="Shouldly" Version="4.0.3" />
1010
<PackageReference Include="xunit" Version="2.4.1" />
1111
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

src/GraphQLParser.Tests/GraphQLParser.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="coverlet.msbuild" Version="3.0.2">
14+
<PackageReference Include="coverlet.msbuild" Version="3.0.3">
1515
<PrivateAssets>all</PrivateAssets>
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
</PackageReference>
18-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
18+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
1919
<PackageReference Include="Shouldly" Version="4.0.3" />
2020
<PackageReference Include="xunit" Version="2.4.1" />
2121
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />

src/GraphQLParser.Tests/ParserTests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,25 @@ public void Extra_Comments_Should_Read_Correctly(IgnoreOptions options)
2121
string query = "ExtraComments".ReadGraphQLFile();
2222

2323
using var document = query.Parse(new ParserOptions { Ignore = options });
24-
document.Definitions.Count().ShouldBe(1);
24+
document.Definitions.Count.ShouldBe(1);
2525
// query
2626
var def = document.Definitions.First() as GraphQLOperationDefinition;
27-
def.SelectionSet.Selections.Count().ShouldBe(2);
27+
def.SelectionSet.Selections.Count.ShouldBe(2);
2828
// person
2929
var field = def.SelectionSet.Selections.First() as GraphQLFieldSelection;
30-
field.SelectionSet.Selections.Count().ShouldBe(1);
30+
field.SelectionSet.Selections.Count.ShouldBe(1);
3131
// name
3232
var subField = field.SelectionSet.Selections.First() as GraphQLFieldSelection;
3333
subField.Comment.ShouldBeNull();
3434
// test
3535
field = def.SelectionSet.Selections.Last() as GraphQLFieldSelection;
36-
field.SelectionSet.Selections.Count().ShouldBe(1);
36+
field.SelectionSet.Selections.Count.ShouldBe(1);
3737
field.Comment.ShouldNotBeNull().Text.ShouldBe("comment2");
3838
// alt
3939
subField = field.SelectionSet.Selections.First() as GraphQLFieldSelection;
4040
subField.Comment.ShouldBeNull();
4141
// extra document comments
42-
document.UnattachedComments.Count().ShouldBe(3);
42+
document.UnattachedComments.Count.ShouldBe(3);
4343
document.UnattachedComments[0].Text.ShouldBe("comment1");
4444
document.UnattachedComments[1].Text.ShouldBe("comment3");
4545
document.UnattachedComments[2].Text.ShouldBe("comment4");
@@ -60,9 +60,9 @@ public void Comments_Can_Be_Ignored(IgnoreOptions options)
6060

6161
var document = query.Parse(new ParserOptions { Ignore = options });
6262
document.UnattachedComments.ShouldBeNull();
63-
document.Definitions.Count().ShouldBe(1);
63+
document.Definitions.Count.ShouldBe(1);
6464
var def = document.Definitions.First() as GraphQLOperationDefinition;
65-
def.SelectionSet.Selections.Count().ShouldBe(1);
65+
def.SelectionSet.Selections.Count.ShouldBe(1);
6666
def.Comment.ShouldBeNull();
6767
var field = def.SelectionSet.Selections.First() as GraphQLFieldSelection;
6868
field.Comment.ShouldBeNull();

src/GraphQLParser/AST/GraphQLDocument.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ protected virtual void Dispose(bool disposing)
4444
/// <inheritdoc/>
4545
public void Dispose()
4646
{
47-
Dispose(true);
47+
Dispose(true);
4848
}
4949
}
5050

src/GraphQLParser/AST/GraphQLScalarValue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ internal sealed class GraphQLScalarValueFull : GraphQLScalarValue
5151
//private GraphQLComment? _comment;
5252

5353
public GraphQLScalarValueFull(ASTNodeKind kind)
54-
:base(kind)
54+
: base(kind)
5555
{
5656
}
5757

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
namespace GraphQLParser.AST
1+
namespace GraphQLParser.AST
22
{
33
public abstract class GraphQLType : ASTNode
44
{
55
}
6-
}
6+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
namespace GraphQLParser.AST
1+
namespace GraphQLParser.AST
22
{
33
public abstract class GraphQLValue : ASTNode
44
{
55
}
6-
}
6+
}

0 commit comments

Comments
 (0)