diff --git a/.circleci/config.yml b/.circleci/config.yml index 48388d6a..dda11487 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 diff --git a/tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj b/tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj index a7c29c94..2af711b9 100644 --- a/tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj +++ b/tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj @@ -4,7 +4,7 @@ - netcoreapp2.0 + netcoreapp1.0;netcoreapp2.0 diff --git a/tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj b/tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj index bfd8fe87..1c0dcb68 100644 --- a/tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj +++ b/tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj @@ -4,7 +4,7 @@ - netcoreapp2.0 + netcoreapp1.0;netcoreapp2.0 diff --git a/tests/tests.props b/tests/tests.props index 822f6b90..ee36ceac 100644 --- a/tests/tests.props +++ b/tests/tests.props @@ -5,7 +5,7 @@ false - CS1591 + CS1591;CS1701