Skip to content

Commit

Permalink
appveyor script
Browse files Browse the repository at this point in the history
Signed-off-by: clemensv <clemensv@microsoft.com>
  • Loading branch information
clemensv committed Nov 27, 2018
1 parent a98954c commit 821d042
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 6 deletions.
7 changes: 4 additions & 3 deletions CloudEvents.sln
Expand Up @@ -10,15 +10,16 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3C6E118F-05CA-41BA-B21E-4E17863F5826}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
appveyor.yml = appveyor.yml
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HttpSend", "samples\HttpSend\HttpSend.csproj", "{F1B9B769-DB6B-481F-905C-24FE3B12E00E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpSend", "samples\HttpSend\HttpSend.csproj", "{F1B9B769-DB6B-481F-905C-24FE3B12E00E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloudNative.CloudEvents.Mqtt", "src\CloudNative.CloudEvents.Mqtt\CloudNative.CloudEvents.Mqtt.csproj", "{FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Mqtt", "src\CloudNative.CloudEvents.Mqtt\CloudNative.CloudEvents.Mqtt.csproj", "{FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CloudNative.CloudEvents.Amqp", "src\CloudNative.CloudEvents.Amqp\CloudNative.CloudEvents.Amqp.csproj", "{39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Amqp", "src\CloudNative.CloudEvents.Amqp\CloudNative.CloudEvents.Amqp.csproj", "{39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
3 changes: 3 additions & 0 deletions README.md
@@ -1,4 +1,7 @@
![Build](https://ci.appveyor.com/api/projects/status/github/cloudevents/sdk-csharp?svg=true)

# sdk-csharp

.NET Standard 2.0 (C#) SDK for CloudEvents

The `CloudNative.CloudEvents` package provides utility methods and classes for creating, encoding, decoding, sending, and receiving CNCF CloudEvents.
Expand Down
35 changes: 35 additions & 0 deletions appveyor.yml
@@ -0,0 +1,35 @@
# main branch
version: 0.1.{build}
clone_depth: 15

branches:
only:
- master
init:
# Good practise, because Windows line endings are different from Unix/Linux ones
- cmd: git config --global core.autocrlf true
install:
# Install repo specific stuff here
before_build:
# Display .NET Core version
- cmd: dotnet --version
# Display minimal restore text
- cmd: dotnet restore CloudEvents.sln --verbosity m
build_script:
# output will be in ./src/bin/debug/netcoreapp1.1/publish
- cmd: dotnet publish CloudEvents.sln
after_build:
# For once the build has completed
#artifacts:
# - path: '\src\bin\Debug\netcoreapp1.1\publish'
# name: WebSite
# type: WebDeployPackage
test_script:
# restore packages for our unit tests
- cmd: dotnet restore CloudEvents.sln --verbosity m
# run the unit tests (requires changing into the test directory)
- cmd: cd test\CloudNative.CloudEvents.UnitTests
- cmd: dotnet test
on_finish :
# any cleanup in here
deploy: off
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
Expand All @@ -7,9 +7,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="MQTTnet" Version="2.8.4" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions test/CloudNative.CloudEvents.UnitTests/HttpTest.cs
Expand Up @@ -34,7 +34,7 @@ public HttpTest()
listener.Start();
listener.GetContextAsync().ContinueWith(t =>
{
if (t.IsCompletedSuccessfully)
if (t.IsCompleted)
{
HandleContext(t.Result);
}
Expand All @@ -56,7 +56,7 @@ async Task HandleContext(HttpListenerContext requestContext)
#pragma warning disable 4014
listener.GetContextAsync().ContinueWith(t =>
{
if (t.IsCompletedSuccessfully)
if (t.IsCompleted)
{
HandleContext(t.Result);
}
Expand Down

0 comments on commit 821d042

Please sign in to comment.