Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from ObjectivityLtd/CI
Browse files Browse the repository at this point in the history
Ci improvments
  • Loading branch information
piotrzajac committed Feb 19, 2019
2 parents 3a221f8 + 5dae1ab commit fbe6f0b
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 42 deletions.
10 changes: 9 additions & 1 deletion AnalysersTests.ruleset → Analysers.Tests.ruleset
Expand Up @@ -401,11 +401,19 @@
<Rule Id="CS8094" Action="Error" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA0001" Action="None" />
<Rule Id="SA1005" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1200" Action="Error" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1512" Action="None" />
<Rule Id="SA1515" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1649" Action="None" />
</Rules>
<Rule Id="SA1652" Action="None" />
</Rules>
</RuleSet>
68 changes: 66 additions & 2 deletions Analysers.ruleset
Expand Up @@ -3,19 +3,31 @@
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1000" Action="Error" />
<Rule Id="CA1001" Action="Error" />
<Rule Id="CA1002" Action="None" />
<Rule Id="CA1003" Action="Error" />
<Rule Id="CA1004" Action="None" />
<Rule Id="CA1005" Action="Error" />
<Rule Id="CA1006" Action="None" />
<Rule Id="CA1007" Action="Error" />
<Rule Id="CA1008" Action="Error" />
<Rule Id="CA1009" Action="Error" />
<Rule Id="CA1010" Action="Error" />
<Rule Id="CA1011" Action="None" />
<Rule Id="CA1012" Action="Error" />
<Rule Id="CA1013" Action="Warning" />
<Rule Id="CA1014" Action="None" />
<Rule Id="CA1016" Action="Error" />
<Rule Id="CA1017" Action="None" />
<Rule Id="CA1018" Action="Error" />
<Rule Id="CA1019" Action="Error" />
<Rule Id="CA1020" Action="None" />
<Rule Id="CA1021" Action="None" />
<Rule Id="CA1023" Action="None" />
<Rule Id="CA1024" Action="Error" />
<Rule Id="CA1025" Action="Error" />
<Rule Id="CA1026" Action="None" />
<Rule Id="CA1027" Action="Error" />
<Rule Id="CA1028" Action="None" />
<Rule Id="CA1030" Action="Warning" />
<Rule Id="CA1031" Action="Error" />
<Rule Id="CA1032" Action="Error" />
Expand All @@ -25,6 +37,7 @@
<Rule Id="CA1036" Action="Error" />
<Rule Id="CA1038" Action="Error" />
<Rule Id="CA1039" Action="Error" />
<Rule Id="CA1040" Action="None" />
<Rule Id="CA1041" Action="Error" />
<Rule Id="CA1043" Action="Error" />
<Rule Id="CA1044" Action="Error" />
Expand All @@ -37,6 +50,10 @@
<Rule Id="CA1051" Action="Error" />
<Rule Id="CA1052" Action="Error" />
<Rule Id="CA1053" Action="Error" />
<Rule Id="CA1054" Action="None" />
<Rule Id="CA1055" Action="None" />
<Rule Id="CA1056" Action="None" />
<Rule Id="CA1057" Action="None" />
<Rule Id="CA1058" Action="Error" />
<Rule Id="CA1059" Action="Error" />
<Rule Id="CA1060" Action="Error" />
Expand All @@ -48,39 +65,71 @@
<Rule Id="CA1300" Action="Error" />
<Rule Id="CA1301" Action="Error" />
<Rule Id="CA1302" Action="Error" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1304" Action="Warning" />
<Rule Id="CA1305" Action="Warning" />
<Rule Id="CA1306" Action="Warning" />
<Rule Id="CA1307" Action="Error" />
<Rule Id="CA1308" Action="Error" />
<Rule Id="CA1309" Action="Error" />
<Rule Id="CA1400" Action="None" />
<Rule Id="CA1401" Action="None" />
<Rule Id="CA1402" Action="None" />
<Rule Id="CA1403" Action="None" />
<Rule Id="CA1404" Action="None" />
<Rule Id="CA1405" Action="None" />
<Rule Id="CA1406" Action="None" />
<Rule Id="CA1407" Action="None" />
<Rule Id="CA1408" Action="None" />
<Rule Id="CA1409" Action="None" />
<Rule Id="CA1410" Action="None" />
<Rule Id="CA1411" Action="None" />
<Rule Id="CA1412" Action="None" />
<Rule Id="CA1413" Action="None" />
<Rule Id="CA1414" Action="None" />
<Rule Id="CA1415" Action="None" />
<Rule Id="CA1500" Action="Error" />
<Rule Id="CA1501" Action="None" />
<Rule Id="CA1502" Action="Error" />
<Rule Id="CA1504" Action="Error" />
<Rule Id="CA1505" Action="Error" />
<Rule Id="CA1506" Action="Error" />
<Rule Id="CA1600" Action="Error" />
<Rule Id="CA1601" Action="Error" />
<Rule Id="CA1700" Action="None" />
<Rule Id="CA1701" Action="Error" />
<Rule Id="CA1702" Action="None" />
<Rule Id="CA1703" Action="Error" />
<Rule Id="CA1704" Action="Error" />
<Rule Id="CA1707" Action="None" />
<Rule Id="CA1708" Action="None" />
<Rule Id="CA1709" Action="Error" />
<Rule Id="CA1710" Action="Error" />
<Rule Id="CA1711" Action="Error" />
<Rule Id="CA1712" Action="Error" />
<Rule Id="CA1713" Action="Error" />
<Rule Id="CA1714" Action="None" />
<Rule Id="CA1715" Action="Error" />
<Rule Id="CA1716" Action="Error" />
<Rule Id="CA1717" Action="None" />
<Rule Id="CA1719" Action="Error" />
<Rule Id="CA1720" Action="Error" />
<Rule Id="CA1721" Action="Error" />
<Rule Id="CA1722" Action="Error" />
<Rule Id="CA1724" Action="Error" />
<Rule Id="CA1725" Action="Error" />
<Rule Id="CA1726" Action="None" />
<Rule Id="CA1800" Action="Error" />
<Rule Id="CA1801" Action="Error" />
<Rule Id="CA1802" Action="Error" />
<Rule Id="CA1804" Action="Error" />
<Rule Id="CA1806" Action="None" />
<Rule Id="CA1809" Action="Error" />
<Rule Id="CA1810" Action="None" />
<Rule Id="CA1811" Action="Error" />
<Rule Id="CA1812" Action="Error" />
<Rule Id="CA1813" Action="None" />
<Rule Id="CA1814" Action="None" />
<Rule Id="CA1815" Action="Error" />
<Rule Id="CA1816" Action="Error" />
<Rule Id="CA1819" Action="Error" />
Expand All @@ -91,7 +140,12 @@
<Rule Id="CA2000" Action="Error" />
<Rule Id="CA2001" Action="Error" />
<Rule Id="CA2002" Action="Error" />
<Rule Id="CA2003" Action="None" />
<Rule Id="CA2004" Action="None" />
<Rule Id="CA2006" Action="None" />
<Rule Id="CA2100" Action="Error" />
<Rule Id="CA2101" Action="None" />
<Rule Id="CA2102" Action="None" />
<Rule Id="CA2103" Action="Warning" />
<Rule Id="CA2104" Action="Error" />
<Rule Id="CA2105" Action="Error" />
Expand All @@ -102,6 +156,7 @@
<Rule Id="CA2111" Action="Error" />
<Rule Id="CA2112" Action="Error" />
<Rule Id="CA2114" Action="Error" />
<Rule Id="CA2115" Action="None" />
<Rule Id="CA2116" Action="Error" />
<Rule Id="CA2117" Action="Error" />
<Rule Id="CA2118" Action="Warning" />
Expand Down Expand Up @@ -139,6 +194,7 @@
<Rule Id="CA2205" Action="Error" />
<Rule Id="CA2207" Action="Error" />
<Rule Id="CA2208" Action="Error" />
<Rule Id="CA2210" Action="None" />
<Rule Id="CA2211" Action="Error" />
<Rule Id="CA2212" Action="Error" />
<Rule Id="CA2213" Action="Error" />
Expand All @@ -149,22 +205,30 @@
<Rule Id="CA2218" Action="Error" />
<Rule Id="CA2219" Action="Error" />
<Rule Id="CA2220" Action="Error" />
<Rule Id="CA2221" Action="None" />
<Rule Id="CA2222" Action="Error" />
<Rule Id="CA2223" Action="None" />
<Rule Id="CA2224" Action="Error" />
<Rule Id="CA2225" Action="None" />
<Rule Id="CA2226" Action="None" />
<Rule Id="CA2227" Action="Error" />
<Rule Id="CA2228" Action="Error" />
<Rule Id="CA2229" Action="Error" />
<Rule Id="CA2230" Action="Error" />
<Rule Id="CA2231" Action="Warning" />
<Rule Id="CA2232" Action="Error" />
<Rule Id="CA2233" Action="Error" />
<Rule Id="CA2234" Action="None" />
<Rule Id="CA2235" Action="Error" />
<Rule Id="CA2236" Action="Error" />
<Rule Id="CA2237" Action="Error" />
<Rule Id="CA2238" Action="Error" />
<Rule Id="CA2239" Action="None" />
<Rule Id="CA2240" Action="Error" />
<Rule Id="CA2241" Action="Error" />
<Rule Id="CA2242" Action="Error" />
<Rule Id="CA2243" Action="Error" />
<Rule Id="CA5122" Action="None" />
</Rules>
<Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
<Rule Id="AD0001" Action="Error" />
Expand Down Expand Up @@ -338,12 +402,12 @@
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1200" Action="Error" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1413" Action="None" />
<Rule Id="SA1512" Action="None" />
<Rule Id="SA1515" Action="None" />
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1601" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1602" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1649" Action="None" />
<Rule Id="SA1652" Action="None" />
Expand Down
Expand Up @@ -2,12 +2,32 @@

<PropertyGroup>
<TargetFramework>net47</TargetFramework>
<CodeAnalysisRuleSet>..\Analysers.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRuleSet>..\Analysers.Tests.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<IsTestProject>true</IsTestProject>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
<PackageReference Include="coverlet.msbuild" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.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.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Expand Up @@ -24,7 +24,8 @@ public FinishStepAsserts(WrappedDialogResult dialogResult)

public void AssertDialogFinishStep(StoryStep storyStep)
{
if (!(storyStep.StoryFrame is DialogStoryFrame dialogStoryFrame))
var dialogStoryFrame = storyStep.StoryFrame as DialogStoryFrame;
if (dialogStoryFrame == null)
{
return;
}
Expand Down
Expand Up @@ -3,29 +3,37 @@
<PropertyGroup>
<TargetFramework>net47</TargetFramework>
<CodeAnalysisRuleSet>..\Analysers.ruleset</CodeAnalysisRuleSet>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.0.0.0</Version>
<PackageVersion>0.0.0.0</PackageVersion>
<AssemblyVersion>0.0.0.0</AssemblyVersion>
<FileVersion>0.0.0.0</FileVersion>
<InformationalVersion>0.0.0.0</InformationalVersion>
<IsPackable>true</IsPackable>
<Authors>Objectivity Bespoke Software Specialists</Authors>
<Company>Objectivity Bespoke Software Specialists</Company>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IncludeSymbols>True</IncludeSymbols>
<IncludeSource>True</IncludeSource>
<Authors>Objectivity Ltd</Authors>
<Company>Objectivity Ltd</Company>
<Description>Tests library for Bot Framework dialogs XUnit tests</Description>
<Copyright></Copyright>
<IsPackable>true</IsPackable>
<PackageTags>C#, bot.framework, xunit</PackageTags>
<PackageProjectUrl>https://github.com/ObjectivityLtd/Bot.Tests.Stories.Xunit</PackageProjectUrl>
<PackageIconUrl>https://github.com/ObjectivityLtd.png</PackageIconUrl>
<RepositoryUrl>https://github.com/ObjectivityLtd/Bot.Tests.Stories.Xunit</RepositoryUrl>
<PackageLicenseUrl>https://opensource.org/licenses/mit-license.php</PackageLicenseUrl>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Bot.Builder" Version="3.15.2.2" />
<PackageReference Include="Moq" Version="4.8.3" />
<PackageReference Include="Microsoft.Bot.Builder" Version="3.19.1.44133" />
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="Objectivity.Bot.Tests.Stories" Version="0.0.15" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004" PrivateAssets="All" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="xunit" Version="2.4.1" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,6 +1,6 @@
# Bot.Tests.Stories.Xunit

[![Build status](https://ci.appveyor.com/api/projects/status/yinx2sypuempoi3g?svg=true)](https://ci.appveyor.com/project/ObjectivityAdminsTeam/bot-tests-stories-xunit)
[![Build Status](https://ci.appveyor.com/api/projects/status/github/ObjectivityLtd/Bot.Tests.Stories.Xunit?branch=master&svg=true)](https://ci.appveyor.com/project/ObjectivityAdminsTeam/bot-tests-stories-xunit) [![Tests Status](https://img.shields.io/appveyor/tests/ObjectivityAdminsTeam/bot-tests-stories-xunit/master.svg)](https://ci.appveyor.com/project/ObjectivityAdminsTeam/bot-tests-stories-xunit) [![codecov](https://codecov.io/gh/ObjectivityLtd/Bot.Tests.Stories.Xunit/branch/master/graph/badge.svg)](https://codecov.io/gh/ObjectivityLtd/Bot.Tests.Stories.Xunit) [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)

Tests library for Bot Framework dialogs using XUnit and Objectivity Test Stories.

Expand Down
63 changes: 36 additions & 27 deletions appveyor.yml
@@ -1,25 +1,12 @@
version: 0.0.{build}
configuration: Release
image: Visual Studio 2017
nuget:
account_feed: true
project_feed: true
disable_publish_on_pr: true
configuration: Release
init:
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$env:APPVEYOR_REPO_TAG_NAME"
}
before_build:
- cmd: dotnet restore
build:
verbosity: detailed
publish_nuget: true
publish_nuget_symbols: true
test:
assemblies:
- '**\*.Tests.dll'
- ps: >-
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
Update-AppveyorBuild -Version "$($env:APPVEYOR_REPO_TAG_NAME.split("-")[0])"
}
dotnet_csproj:
patch: true
file: '**\*.csproj'
Expand All @@ -29,12 +16,34 @@ dotnet_csproj:
file_version: '{version}'
informational_version: '{version}'
environment:
NugetApiKey:
secure: ZDpU+qPlLxIhcfhYnqYxazI6g9gwt6e086vlBogpXETSL9C7WTbLdaH6rPEOz3v7
namespace: Objectivity.Bot.Tests.Stories.Xunit
cc: opencover
install:
- ps: >-
choco install codecov
build_script:
- ps: >-
dotnet build
if ($env:APPVEYOR_REPO_TAG -eq "true")
{
dotnet pack ./$env:namespace --no-build -p:PackageVersion=$env:APPVEYOR_REPO_TAG_NAME
}
else
{
dotnet pack ./$env:namespace --no-build -p:PackageVersion=$env:APPVEYOR_BUILD_VERSION
}
test_script:
- cmd: >-
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=%cc% /p:CoverletOutput=%appveyor_build_folder%\%cc%\%namespace%.xml
codecov -f %appveyor_build_folder%\%cc%\%namespace%.xml --flag unittests
artifacts:
- path: '**\*.nupkg'
deploy:
- provider: NuGet
api_key: $(NugetApiKey)
artifact: /.*\.nupkg/
on:
appveyor_repo_tag: true
skip_symbols: false
- provider: NuGet
api_key:
secure: ZDpU+qPlLxIhcfhYnqYxazI6g9gwt6e086vlBogpXETSL9C7WTbLdaH6rPEOz3v7
on:
appveyor_repo_tag: true
skip_symbols: false

0 comments on commit fbe6f0b

Please sign in to comment.