- 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.yml
file in your project root from the template. You should modify only the values of the environment variables (marked withxXx
in the sample). - Create the
project.json
file in your project root from the template. Your project should consist of anapp
project, atests
project and aperftests
project. - Add/merge the followings to the
csproj
of your project (under theProject
node):<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 (
SRC
by default). Indocfx.json
modifycsproj
name and title, inindex.md
modify the URLs. - Add/merge the followings to the
csproj
of your test project (under theProject
node):<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
csproj
of your benchmark project (under theProject
node):<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 (
PERF
by default). Inindex.md
modify the URLs. - GitIgnore the
Artifacts
folder in your project root. - GitIgnore
manifest.json
on yourgh-pages
branch. - Create an
index.html
on yourgh-pages
branch:<!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
perf
tag but results are publishd only if the tag was placed on amaster
branch commit - API docs are updated and publishd on every
master
branch commit - NuGet package is deployed on version tags (e.g.
v1.0.0-preview1
) placed on amaster
branch commit