Skip to content

Commit

Permalink
Merge pull request #5 from djluck/net60-build
Browse files Browse the repository at this point in the history
Net60 build
  • Loading branch information
djluck authored Apr 29, 2022
2 parents 7ec2f3d + 35ef4ff commit 507ce51
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-nuget-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- run: |
echo "Github ref is ${GITHUB_REF}"
arrTag=(${GITHUB_REF//\// })
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- uses: actions/checkout@v1
- run: dotnet test -c "Debug"
2 changes: 1 addition & 1 deletion src/PromQL.Parser/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static IEnumerable<PromToken> FindTokensMatching(Func<TokenAttribute, bo
.Select(x => Enum.Parse<PromToken>(x.enumMember.Name))
.ToHashSet();

private static readonly HashSet<PromToken> AlphanumericOperatorTokens = FindTokensMatching(attr => attr.Category == "Operator" && Regex.IsMatch(attr.Example, "^[a-zA-Z0-9]+$"))
private static readonly HashSet<PromToken> AlphanumericOperatorTokens = FindTokensMatching(attr => attr.Category == "Operator" && Regex.IsMatch(attr.Example!, "^[a-zA-Z0-9]+$"))
.ToHashSet();

private static readonly HashSet<PromToken> KeywordAndAlphanumericOperatorTokens = FindTokensMatching(attr => attr.Category == "Keyword")
Expand Down
4 changes: 2 additions & 2 deletions src/PromQL.Parser/PromQL.Parser.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net6.0</TargetFrameworks>
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
Expand All @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="ExhaustiveMatching.Analyzer" Version="0.5.0" />
<PackageReference Include="IsExternalInit" Version="1.0.1">
<PackageReference Include="IsExternalInit" Version="1.0.1" Condition="$(TargetFramework) == 'netcoreapp3.1'">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Binary file modified tests/PromQL.Parser.Tests/PromQL.Parser.Tests.csproj
Binary file not shown.

0 comments on commit 507ce51

Please sign in to comment.