- Existing GitHub repo
- A submodule in your main repo containing this repository (e.g. in "scripts" folder)
- Enabled GitHub pages using gh-pages branch
- An AppVeyor account set up for your repo
- A Coveralls account set up for your repo
- A NuGet account for your project
To work properly you need to create some access tokens and secure them:
- GitHub: only the repo scope required
- A Coveralls
repo_token(you get it during the repo registration) - A NuGet API key
In the followings you MUST use the SECURED values of the tokens above
- Create the
appveyor.ymlfile in your project root from the template. You should modify only the values of the environment variables (marked withxXxin the sample). - Create the
project.jsonfile in your project root from the template. Your project should consist of anappproject, atestsproject and aperftestsproject. - Add/merge the followings to the
csprojof your project (under theProjectnode):<PropertyGroup> <TargetFrameworks>netstandard1.6;netstandard2.0;netstandard2.1</TargetFrameworks> <Company>Your Company</Company> <Authors>Your Name</Authors> <Version>1.0.0-preview1</Version> <AssemblyName>YourProject</AssemblyName> </PropertyGroup> <ItemGroup> <None Remove="docfx.json" /> <None Remove="index.md" /> <None Include="path\to\icon.png" Pack="true" PackagePath=""/> </ItemGroup> <PropertyGroup> <DocumentationFile>..\BIN\YourProject.xml</DocumentationFile> <Product>...</Product> <Description>...</Description> <PackageId>...</PackageId> <PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageIcon>icon.png</PackageIcon> <PackageTags>...;...;...;</PackageTags> <PackageReleaseNotes>See homepage.</PackageReleaseNotes> </PropertyGroup>
- Copy the docfx.json and index.md to the source folder of your project (
SRCby default). Indocfx.jsonmodifycsprojname and title, inindex.mdmodify the URLs. - Add/merge the followings to the
csprojof your test project (under theProjectnode):<PropertyGroup> <TargetFrameworks>net5.0</TargetFrameworks> <IsPackable>false</IsPackable> <IsTestProject>true</IsTestProject> <AssemblyName>YourProject.Tests</AssemblyName> <RootNamespace>YourProject.Tests</RootNamespace> <Configurations>Debug</Configurations> <OutputType>Library</OutputType> </PropertyGroup> <ItemGroup> <PackageReference Include="nunit" Version="3.*" /> <PackageReference Include="NUnit3TestAdapter" Version="3.*" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.*" /> <PackageReference Include="NunitXml.TestLogger" Version="3.*" /> </ItemGroup>
- Add/merge the followings to the
csprojof your benchmark project (under theProjectnode):<PropertyGroup> <OutputType>Exe</OutputType> <IsPackable>false</IsPackable> <TargetFramework>net5.0</TargetFramework> <AssemblyName>YourProject.Perf</AssemblyName> </PropertyGroup> <ItemGroup> <None Remove="docfx.json" /> <None Remove="index.md" /> </ItemGroup> <ItemGroup> <PackageReference Include="BenchmarkDotNet" Version="0.12.*" /> <PackageReference Condition="'$(LibVersion)' != ''" Include="YourProjectId" Version="$(LibVersion)"></PackageReference> </ItemGroup> <ItemGroup> <ProjectReference Condition="'$(LibVersion)' == ''" Include="..\SRC\YourProject.csproj" /> </ItemGroup>
- Copy the docfx.json and index.md to the source folder of your benchmark project (
PERFby default). Inindex.mdmodify the URLs. - GitIgnore the
Artifactsfolder in your project root. - GitIgnore
manifest.jsonon yourgh-pagesbranch. - Create an
index.htmlon yourgh-pagesbranch:<!DOCTYPE html> <html> <head> <meta http-equiv="Refresh" content="0; url=https://YourName.github.io/YourProject/doc/"> </head> </html>
- Create a project icon (named
icon.png) in your project root.
Will be placed on your gh-pages branch under the doc and perf folder
- Regular tests are done on every branch on every commit
- Performance tests are done on
perftag but results are publishd only if the tag was placed on amasterbranch commit - API docs are updated and publishd on every
masterbranch commit - NuGet package is deployed on version tags (e.g.
v1.0.0-preview1) placed on amasterbranch commit