Skip to content
Merged
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
58 changes: 20 additions & 38 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,64 @@
version: 2
jobs:
test-debug-netcoreapp2.0:
working_directory: ~/GraphQL.Client/
docker:
- image: microsoft/dotnet:2-sdk
- image: microsoft/dotnet:2.1-sdk
steps:
- checkout
- run: dotnet test --configuration Debug --framework netcoreapp2.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --configuration Debug --framework netcoreapp2.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
test-debug:
working_directory: ~/GraphQL.Client/
test-debug-netcoreapp2.1:
docker:
- image: microsoft/dotnet:2-sdk
- image: microsoft/dotnet:2.1-sdk
steps:
- checkout

# Common
- run: dotnet test --configuration Debug --framework netcoreapp2.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --configuration Debug --framework netcoreapp2.1 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj

# Client
- run: dotnet test --configuration Debug --framework netcoreapp2.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
- run: dotnet test --configuration Debug --framework netcoreapp2.1 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj

test-release:
working_directory: ~/GraphQL.Client/
test-release-netcoreapp2.0:
docker:
- image: microsoft/dotnet:2-sdk
- image: microsoft/dotnet:2.1-sdk
steps:
- checkout

# Common
- run: dotnet test --configuration Release --framework netcoreapp2.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --configuration Release --framework netcoreapp2.1 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj

# Client
- run: dotnet test --configuration Release --framework netcoreapp2.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
test-release-netcoreapp2.1:
docker:
- image: microsoft/dotnet:2.1-sdk
steps:
- checkout
- run: dotnet test --configuration Release --framework netcoreapp2.1 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
- run: dotnet test --configuration Release --framework netcoreapp2.1 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
deploy:
working_directory: ~/GraphQL.Client/
docker:
- image: microsoft/dotnet:2-sdk
- image: microsoft/dotnet:2.1-sdk
environment:
MY_GET_SOURCE: https://www.myget.org/F/graphql-dotnet/api/v3/index.json
steps:
- checkout
- run: dotnet restore
- run: dotnet build
- run: dotnet pack
- run: dotnet build --configuration Release ./src/GraphQL.Common/GraphQL.Common.csproj
- run: dotnet pack --configuration Release ./src/GraphQL.Common/GraphQL.Common.csproj
- run: dotnet build --configuration Release ./src/GraphQL.Client/GraphQL.Client.csproj
- run: dotnet pack --configuration Release ./src/GraphQL.Client/GraphQL.Client.csproj

# Store Artifacts
- run: dotnet build --configuration Release
- run: dotnet pack --configuration Release
- store_artifacts:
path: ./src/GraphQL.Common/bin/Release/GraphQL.Common.2.0.0-alpha.1.nupkg
- store_artifacts:
path: ./src/GraphQL.Client/bin/Release/GraphQL.Client.2.0.0-alpha.1.nupkg

# Deploy
- deploy:
name: MyGet
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
dotnet nuget push ./src/GraphQL.Common/bin/Release/GraphQL.Common.2.0.0-alpha.1.nupkg --api-key $MY_GET_API_KEY --source $MY_GET_SOURCE
dotnet nuget push ./src/GraphQL.Client/bin/Release/GraphQL.Client.2.0.0-alpha.1.nupkg --api-key $MY_GET_API_KEY --source $MY_GET_SOURCE
fi

workflows:
version: 2
build-test-and-deploy:
jobs:
- test-debug-netcoreapp2.0
- test-debug
- test-release
- test-debug-netcoreapp2.1
- test-release-netcoreapp2.0
- test-release-netcoreapp2.1
- deploy:
requires:
- test-debug-netcoreapp2.0
- test-debug
- test-release
- test-debug-netcoreapp2.1
- test-release-netcoreapp2.0
- test-release-netcoreapp2.1