Skip to content

Commit 4f3d6df

Browse files
author
Raul Hidalgo Caballero
authored
Testing multiple versions (#11)
* tests run in multiple versions * added workflows * netcore2.0 * --framework netcoreapp2.0 * netcore1.0 tests * changed docker image * netcoreapp1.1 * Revert "netcoreapp1.1" This reverts commit f048c6f. * dotnet restore is required in netcore1.0 * $VERSION * NoVersion
1 parent 900c7a4 commit 4f3d6df

File tree

4 files changed

+39
-15
lines changed

4 files changed

+39
-15
lines changed

.circleci/config.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,36 @@
11
version: 2
22
jobs:
3-
build:
3+
netcore1.0:
44
working_directory: ~/GraphQL.Client/
55
docker:
6-
- image: microsoft/dotnet:2.0-sdk
6+
- image: microsoft/dotnet:1-sdk
7+
steps:
8+
- checkout
9+
10+
# Test
11+
- run: dotnet restore
12+
- run: dotnet test --framework netcoreapp1.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
13+
- run: dotnet test --framework netcoreapp1.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
14+
15+
netcore2.0:
16+
working_directory: ~/GraphQL.Client/
17+
docker:
18+
- image: microsoft/dotnet:2-sdk
19+
steps:
20+
- checkout
21+
22+
# Test
23+
- run: dotnet test --framework netcoreapp2.0 ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
24+
- run: dotnet test --framework netcoreapp2.0 ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
25+
26+
deploy:
27+
working_directory: ~/GraphQL.Client/
28+
docker:
29+
- image: microsoft/dotnet:2-sdk
730
environment:
831
MY_GET_SOURCE: https://www.myget.org/F/graphql-dotnet/api/v3/index.json
932
steps:
1033
- checkout
11-
12-
# Test
13-
- restore_cache:
14-
key: NUGET
15-
- run: dotnet test ./tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj
16-
- run: dotnet test ./tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj
17-
- save_cache:
18-
key: NUGET
19-
paths:
20-
- ~/.nuget/
2134

2235
# Pack
2336
- run: dotnet build --configuration Release ./src/GraphQL.Common/GraphQL.Common.csproj
@@ -39,3 +52,14 @@ jobs:
3952
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
4053
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
4154
fi
55+
56+
workflows:
57+
version: 2
58+
build-test-and-deploy:
59+
jobs:
60+
- netcore1.0
61+
- netcore2.0
62+
- deploy:
63+
requires:
64+
- netcore1.0
65+
- netcore2.0

tests/GraphQL.Client.Tests/GraphQL.Client.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="../tests.props" />
55

66
<PropertyGroup>
7-
<TargetFramework>netcoreapp2.0</TargetFramework>
7+
<TargetFrameworks>netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
88
</PropertyGroup>
99

1010
<ItemGroup>

tests/GraphQL.Common.Tests/GraphQL.Common.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Import Project="../tests.props" />
55

66
<PropertyGroup>
7-
<TargetFramework>netcoreapp2.0</TargetFramework>
7+
<TargetFrameworks>netcoreapp1.0;netcoreapp2.0</TargetFrameworks>
88
</PropertyGroup>
99

1010
<ItemGroup>

tests/tests.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<PropertyGroup>
77
<IsPackable>false</IsPackable>
8-
<NoWarn>CS1591</NoWarn>
8+
<NoWarn>CS1591;CS1701</NoWarn>
99
</PropertyGroup>
1010

1111
<ItemGroup>

0 commit comments

Comments
 (0)