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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ csharp_style_var_elsewhere = true:suggestion

# C# code style settings - Expression-bodied members
# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-language-conventions?view=vs-2019#expression-bodied-members
csharp_style_expression_bodied_methods = when_on_single_line:warning
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
csharp_style_expression_bodied_constructors = false:suggestion
csharp_style_expression_bodied_operators = when_on_single_line:warning
csharp_style_expression_bodied_properties = when_on_single_line:warning
Expand Down
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug

---

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots and any additional context**
If applicable, add screenshots or any other context here to help explain your problem.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
This is optional description of what you want to happen.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: daily
time: '02:00'
open-pull-requests-limit: 10
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"test":
- src/GraphQLParser.ApiTests/**/*
- src/GraphQLParser.Tests/**/*

"CI":
- .github/workflows/**/*

"code style":
- .editorconfig

"documentation":
- README.md

"performance":
- src/GraphQLParser.Benchmarks/**/*
17 changes: 17 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

name: Labeler
on: [pull_request]

jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
47 changes: 47 additions & 0 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish preview to GitHub registry

# ==== NOTE: do not rename this yml file or the $GITHUB_RUN_NUMBER will be reset ====

on:
push:
branches:
- master
- develop
paths:
- src/**
- .github/workflows/**

jobs:
pack:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Use .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
source-url: https://nuget.pkg.github.com/graphql-dotnet/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Install dependencies
working-directory: src
run: dotnet restore
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
- name: Build solution [Release]
working-directory: src
run: dotnet build --no-restore -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER
- name: Pack solution [Release]
working-directory: src
run: dotnet pack --no-restore -c Release -p:VersionSuffix=$GITHUB_RUN_NUMBER -o out
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Nuget packages
path: |
src/out/*
- name: Publish Nuget packages to GitHub registry
working-directory: src
run: dotnet nuget push "out/*" -k ${{secrets.GITHUB_TOKEN}}
53 changes: 53 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish release to Nuget registry

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check github.ref starts with 'refs/tags/'
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
echo Error! github.ref does not start with 'refs/tags'
echo github.ref: ${{ github.ref }}
exit 1
- name: Set release version number
env:
github_ref: ${{ github.ref }}
run: |
version="${github_ref:10}"
echo version=$version
echo "version=$version" >> $GITHUB_ENV
- name: Use .NET Core 3.1 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
source-url: https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_AUTH_TOKEN}}
- name: Install dependencies
working-directory: src
run: dotnet restore
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
- name: Build solution [Release]
working-directory: src
run: dotnet build --no-restore -c Release -p:Version=$version
- name: Pack solution [Release]
working-directory: src
run: dotnet pack --no-restore -c Release -p:Version=$version -o out
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: Nuget packages
path: |
src/out/*
- name: Publish Nuget packages to Nuget registry
working-directory: src
run: dotnet nuget push "out/*" -k ${{secrets.NUGET_AUTH_TOKEN}}
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run unit tests

on:
pull_request:
branches:
- master
- develop
paths:
- src/**
- .github/workflows/**

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Use .NET Core 3.1 LTS SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Install dependencies
working-directory: src
run: dotnet restore
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
- name: Build solution [Release]
working-directory: src
run: dotnet build --no-restore -c Release
- name: Build solution [Debug]
working-directory: src
run: dotnet build --no-restore -c Debug
- name: Test solution [Debug]
working-directory: src
run: dotnet test --no-restore
20 changes: 20 additions & 0 deletions .github/workflows/wipcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check if PR title contains [WIP]

on:
pull_request:
types:
- opened # when PR is opened
- edited # when PR is edited
- synchronize # when code is added
- reopened # when a closed PR is reopened

jobs:
check-title:
runs-on: ubuntu-latest

steps:
- name: Fail build if pull request title contains [WIP]
if: ${{ contains(github.event.pull_request.title, '[WIP]') }} # This function is case insensitive.
run: |
echo Warning! PR title "${{ github.event.pull_request.title }}" contains [WIP]. Remove [WIP] from the title when PR is ready.
exit 1
35 changes: 0 additions & 35 deletions appveyor.yml

This file was deleted.

29 changes: 0 additions & 29 deletions package.json

This file was deleted.

33 changes: 26 additions & 7 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
<Project>

<PropertyGroup>
<VersionPrefix>5.3.3</VersionPrefix>
<Authors>Marek Magdziak</Authors>
<NoWarn>$(NoWarn);1591</NoWarn>
<Copyright>Copyright 2016-2020 Marek Magdziak et al. All rights reserved.</Copyright>
<VersionPrefix>5.3.5-preview</VersionPrefix>
<LangVersion>latest</LangVersion>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<LangVersion>latest</LangVersion>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
<Authors>Marek Magdziak</Authors>
<Copyright>Copyright 2016-$(CurrentYear) $(Authors) et al. All rights reserved.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageIcon>logo.64x64.png</PackageIcon>
<RepositoryType>git</RepositoryType>
<DebugType>embedded</DebugType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables -->
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">True</ContinuousIntegrationBuild>
<NoWarn>$(NoWarn);1591</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>


<ItemGroup>
<None Include="..\..\assets\logo.64x64.png" Pack="true" PackagePath="" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" Condition="'$(IsPackable)' == 'true'"/>
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/GraphQLParser.ApiTests/ApiApprovalTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using PublicApiGenerator;
using PublicApiGenerator;
using Shouldly;
using Xunit;

Expand Down
10 changes: 5 additions & 5 deletions src/GraphQLParser.ApiTests/GraphQLParser.ApiTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Include="Shouldly" Version="4.0.0-beta0002" />
<PackageReference Include="Shouldly" Version="4.0.0-beta0004" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\GraphQLParser\GraphQLParser.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading