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
48 changes: 36 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
version: 2
jobs:
build:
netcore1.0:
working_directory: ~/GraphQL.Client/
docker:
- image: microsoft/dotnet:2.0-sdk
- image: microsoft/dotnet:1-sdk
steps:
- checkout

# Test
- run: dotnet restore
- run: dotnet test --framework netcoreapp1.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --framework netcoreapp1.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj

netcore2.0:
working_directory: ~/GraphQL.Client/
docker:
- image: microsoft/dotnet:2-sdk
steps:
- checkout

# Test
- run: dotnet test --framework netcoreapp2.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --framework netcoreapp2.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj

deploy:
working_directory: ~/GraphQL.Client/
docker:
- image: microsoft/dotnet:2-sdk
environment:
MY_GET_SOURCE: https://www.myget.org/F/graphql-dotnet/api/v3/index.json
steps:
- checkout

# Test
- restore_cache:
key: NUGET
- run: dotnet test ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
- save_cache:
key: NUGET
paths:
- ~/.nuget/

# Pack
- run: dotnet build --configuration Release ./src/GraphQL.Common/GraphQL.Common.csproj
Expand All @@ -39,3 +52,14 @@ jobs:
dotnet nuget push ./src/GraphQL.Common/bin/Release/GraphQL.Common.1.0.0-beta2.nupkg --api-key $MY_GET_API_KEY --source $MY_GET_SOURCE
dotnet nuget push ./src/GraphQL.Client/bin/Release/GraphQL.Client.1.0.0-beta2.nupkg --api-key $MY_GET_API_KEY --source $MY_GET_SOURCE
fi

workflows:
version: 2
build-test-and-deploy:
jobs:
- netcore1.0
- netcore2.0
- deploy:
requires:
- netcore1.0
- netcore2.0
2 changes: 1 addition & 1 deletion tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="../tests.props" />

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Import Project="../tests.props" />

<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<PropertyGroup>
<IsPackable>false</IsPackable>
<NoWarn>CS1591</NoWarn>
<NoWarn>CS1591;CS1701</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down