Skip to content

Commit 4a9fd8c

Browse files
authored
Merge pull request #138 from progaudi/fix-azure-pipeline
Fix azure pipeline
2 parents b1856f7 + 94df6ca commit 4a9fd8c

File tree

6 files changed

+46
-27
lines changed

6 files changed

+46
-27
lines changed

.azure/build.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
parameters:
2+
netcore1Global: true
3+
4+
steps:
5+
- task: DotNetCoreCLI@2
6+
displayName: dotnet build
7+
inputs:
8+
command: build
9+
projects: progaudi.tarantool.sln
10+
arguments: -c Release
11+
verbosityRestore: minimal

.azure/tests.yml

-23
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,6 @@ parameters:
22
netcore1Global: true
33

44
steps:
5-
- task: DotNetCoreCLI@2
6-
displayName: dotnet build
7-
inputs:
8-
command: build
9-
projects: progaudi.tarantool.sln
10-
arguments: -c Release
11-
verbosityRestore: minimal
12-
13-
- task: Bash@3
14-
displayName: set version variable
15-
inputs:
16-
targetType: inline
17-
script: echo "##vso[task.setvariable variable=NugetPackageVersion]$(git describe --tags | sed 's/-/./')"
18-
19-
- task: DotNetCoreCLI@2
20-
displayName: pack nuget package
21-
inputs:
22-
command: pack
23-
versioningScheme: byEnvVar
24-
versionEnvVar: NugetPackageVersion
25-
arguments: --no-build -c Release /property:PackageOutputPath=$(Build.ArtifactStagingDirectory)
26-
verbosityPack: minimal
27-
285
- task: Bash@3
296
inputs:
307
targetType: inline

azure-pipelines.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,17 @@ jobs:
33
pool:
44
name: Hosted macOS
55
steps:
6-
- template: .azure/tests.yml
6+
- template: .azure/build.yml
77

88
- job: linux
99
pool:
1010
name: Hosted Ubuntu 1604
1111
steps:
12+
- template: .azure/build.yml
13+
1214
- script: curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -channel 1.1
1315
displayName: Installing .netcore 1.1
16+
1417
- template: .azure/tests.yml
1518
parameters:
1619
netcore1Global: false
@@ -22,7 +25,15 @@ jobs:
2225
pool:
2326
name: Hosted VS2017
2427
steps:
25-
- template: .azure/tests.yml
28+
- template: .azure/build.yml
29+
30+
- task: PowerShell@2
31+
displayName: pack nuget package
32+
inputs:
33+
targetType: inline
34+
script: |
35+
$version = $(git describe --tags | %{$_ -replace '-([^g])', '.$1'})
36+
dotnet pack --no-build -v minimal -c Release /property:Version=$version /property:PackageOutputPath=$(Build.ArtifactStagingDirectory)
2637
2738
- ${{ if ne(variables['Build.Reason'], 'PullRequest') }}:
2839
- task: NuGetCommand@2

src/progaudi.tarantool/progaudi.tarantool.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</PropertyGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="MsgPack.Light" Version="1.6.0" />
31+
<PackageReference Include="MsgPack.Light" Version="1.6.1" />
3232
<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />
3333
<PackageReference Include="System.Threading.Thread" Version="4.3.0" />
3434
</ItemGroup>

tarantool/testdata.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ function return_tuple()
152152
return { 1, 2 }
153153
end
154154

155-
156155
function return_array()
157156
log.info('return_array called')
158157
return {{ "abc", "def" }}
@@ -167,6 +166,10 @@ function return_nothing()
167166
log.info('return_nothing called')
168167
end
169168

169+
function replace(t)
170+
return box.space.with_scalar_index:replace(t)
171+
end
172+
170173
local truncate_space = function(name)
171174
local space = box.space[name]
172175

tests/progaudi.tarantool.tests/Box/Call_Should.cs

+17
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,22 @@ public async Task return_nothing_should_not_throw()
131131
Should.NotThrow(async () => await tarantoolClient.Call("return_nothing"));
132132
}
133133
}
134+
135+
[Fact]
136+
public async Task replace_via_call()
137+
{
138+
using (var tarantoolClient = await Client.Box.Connect(ConnectionStringFactory.GetReplicationSource_1_8()))
139+
{
140+
var tuple = ("123", new byte[] { 1, 2, 3 });
141+
var result = await tarantoolClient.Call<ValueTuple<string, byte[]>[], ValueTuple<string, byte[]>>(
142+
"replace",
143+
new [] { tuple });
144+
145+
var firstTuple = result.Data[0];
146+
147+
tuple.Item1.ShouldBe(firstTuple.Item1);
148+
tuple.Item2.ShouldBe(firstTuple.Item2);
149+
}
150+
}
134151
}
135152
}

0 commit comments

Comments
 (0)