Skip to content

Commit

Permalink
Merge pull request #34 from nunit/release-3.7.0
Browse files Browse the repository at this point in the history
Release 3.7.0
  • Loading branch information
CharliePoole authored Sep 16, 2021
2 parents d41903a + ef9364a commit 5f56c28
Show file tree
Hide file tree
Showing 25 changed files with 191 additions and 110 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ MockAssemblyResult.xml
PortabilityAnalysis*.html
tools
!tools/packages.config
DraftRelease.md
33 changes: 33 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## NUnit V2 Result Writer Extension 3.7.0 - September 16, 2021

This release consists primarily of improvements to the build process but also
corrects several problems in the content of the V2 result file.

### Bugs

* 9 NUnit3 result format output as nunit2 reports test dll as ignored if one or more child tests marked as ignored
* 11 Wrong version information of NUnit 3 in NUnit 2 export format
* 13 Results xml-file in nunit2 format does not confirm to xsd

### Build

* 16 Automate the GitHub release process
* 17 Change default branch from master to main
* 21 Add functional package tests to build
* 25 Upgrade to latest Cake Release
* 27 Publish dev builds on MyGet
* 28 Publish production builds on NuGet and Chocolatey
* 30 Standardize build scripts for extensions

## NUnit V2 Result Writer Extension 3.6.0 - August 1, 2017

This release fixes an error in the build and adds a chocolatey package.

### Issues Resolved

* 3 No license file in NuGet package
* 4 Integrate chocolatey package in build script

## NUnit V2 Result Writer Extension 3.5.0 - October 6, 2016

The first independent release of the nunit-v2-result-writer extension.
12 changes: 0 additions & 12 deletions CHANGES.txt

This file was deleted.

56 changes: 56 additions & 0 deletions GitReleaseManager.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# The labels that will be used to include issues in release notes.
issue-labels-include:
- Feature
- Enhancement
- Bug
- Build
- Documentation
# The labels that will NOT be used when including issues in release notes.
issue-labels-exclude:
- Refactor
# Overrides default pluralization and header names for specific labels.
issue-labels-alias:
- name: Build
header: Build
plural: Build
- name: Documentation
header: Documentation
plural: Documentation
# Configuration values used when creating new releases
create:
include-footer: true
footer-heading: Packages
footer-content: >-
There are two different packages available for the extension.
<ul>
<li>For a chocolatey install: `nunit-extension-nunit-v2-result-writer.{milestone}.nupkg`
<li>For a nuget install: `NUnit.Extension.NUnitV2ResultWriter.{milestone}.nupkg`
</ul>
You may also download the extension from
[chocolatey.org](https://chocolatey.org/packages/nunit-extension-nunit-v2-result-writer/)
or [nuget.org](https://nuget.org/packages/NUnit.Extension.NUnitV2ResultWriter/).
footer-includes-milestone: true
milestone-replace-text: '{milestone}'
include-sha-section: true
sha-section-heading: "SHA256 Hashes of the release artifacts"
sha-section-line-format: "- `{1}\t{0}`"
allow-update-to-published: false
# Configuration values used when exporting release notes
export:
include-created-date-in-title: true
created-date-string-format: MMMM dd, yyyy
perform-regex-removal: false
# regex-text: '### Where to get it(\r\n)*You can .*\.'
# multiline-regex: false
# Configuration values used when closing a milestone
close:
# Whether to add comments to issues closed with the published milestone release.
use-issue-comments: true
issue-comment: |-
:tada: This issue has been resolved in version {milestone} :tada:
The release is available on:
- [GitHub Release](https://github.com/{owner}/{repository}/releases/tag/{milestone})
- [NuGet Package](https://www.nuget.org/packages/NUnit.Extension.NUnitV2ResultWriter/{milestone})
- [Chocolatey Package](https://chocolatey.org/packages/nunit-extension-nunit-v2-result-writer/{milestone})
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 Charlie Poole
Copyright (c) 2016-2021 Charlie Poole

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ environment:
secure: 3ojZLs9hiHk/7047hiirFk/qG2RxUACmA8DAUk+8AoILr5R7c4tDGXeTsBjjhq5h
CHOCO_API_KEY:
secure: aDsu1U+umVYFVybjkBVtVQsatSj3QKbD7VkGQci9mNF3493g9Giao/GABISIaHjT
GITHUB_ACCESS_TOKEN:
secure: xmGXWrw5Nj3CI3fPxhw/DWIU5YL/1mM06pSmjpkd9LpKs3t3EYXbECbEQs62lU/O
30 changes: 24 additions & 6 deletions build.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

#tool nuget:?package=GitVersion.CommandLine&version=5.0.0
#tool nuget:?package=GitReleaseManager&version=0.11.0
#tool nuget:?package=NUnit.ConsoleRunner&version=3.10.0
#tool nuget:?package=NUnit.ConsoleRunner&version=3.11.1
#tool nuget:?package=NUnit.Extension.NUnitProjectLoader&version=3.6.0
Expand Down Expand Up @@ -172,7 +178,7 @@ Task("VerifyNuGetPackage")
.Does<BuildParameters>((parameters) =>
{
Check.That(parameters.NuGetInstallDirectory,
HasFiles("CHANGES.txt", "LICENSE.txt"),
HasFiles("CHANGES.md", "LICENSE.txt"),
HasDirectory("tools/net20").WithFile("nunit-v2-result-writer.dll"),
HasDirectory("tools/netcoreapp2.1").WithFile("nunit-v2-result-writer.dll"));
Information("Verification was successful!");
Expand Down Expand Up @@ -211,7 +217,7 @@ Task("VerifyChocolateyPackage")
.Does<BuildParameters>((parameters) =>
{
Check.That(parameters.ChocolateyInstallDirectory,
HasDirectory("tools").WithFiles("CHANGES.txt", "LICENSE.txt", "VERIFICATION.txt"),
HasDirectory("tools").WithFiles("CHANGES.md", "LICENSE.txt", "VERIFICATION.txt"),
HasDirectory("tools/net20").WithFile("nunit-v2-result-writer.dll"),
HasDirectory("tools/netcoreapp2.1").WithFile("nunit-v2-result-writer.dll"));
Information("Verification was successful!");
Expand Down Expand Up @@ -354,7 +360,7 @@ Task("CreateDraftRelease")
// for both the name of the draft release and the milestone,
// i.e. release-2.0.0, release-2.0.0-beta2, etc.
string milestone = parameters.BranchName.Substring(8);
string releaseName = $"NUnit V2 Result Writer {milestone}";
string releaseName = $"NUnit V2 Result Writer Extension {milestone}";
Information($"Creating draft release...");
Expand All @@ -373,16 +379,28 @@ Task("CreateDraftRelease")
Error("");
throw;
}
GitReleaseManagerExport(parameters.GitHubAccessToken, GITHUB_OWNER, GITHUB_REPO, "DraftRelease.md",
new GitReleaseManagerExportSettings() { TagName = milestone });
}
else
{
Information("Skipping Release creation because this is not a release branch");
}
});

Task("ExportDraftRelease")
.Description("Export draft release locally for use in updating CHANGES.md")
.Does<BuildParameters>((parameters) =>
{
if (parameters.IsReleaseBranch && parameters.IsLocalBuild)
{
string milestone = parameters.BranchName.Substring(8);
GitReleaseManagerExport(parameters.GitHubAccessToken, GITHUB_OWNER, GITHUB_REPO, "DraftRelease.md",
new GitReleaseManagerExportSettings() { TagName = milestone });
}
else
Error("ExportDraftRelease may only be run locally, using a release branch!");
});

//////////////////////////////////////////////////////////////////////
// CREATE A PRODUCTION RELEASE
//////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions cake/assertions.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

public static class Assert
{
internal static List<string> FailureMessages = new List<string>();
Expand Down
5 changes: 5 additions & 0 deletions cake/constraints.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

public abstract class Constraint<TActual>
{
public abstract bool Matches(TActual actual);
Expand Down
7 changes: 6 additions & 1 deletion cake/package-checks.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
//////////////////////////////////////////////////////////////////////
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

//////////////////////////////////////////////////////////////////////
// SYNTAX FOR EXPRESSING CHECKS
//////////////////////////////////////////////////////////////////////

Expand Down
7 changes: 6 additions & 1 deletion cake/package-tests.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using System.Xml;
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

using System.Xml;

//////////////////////////////////////////////////////////////////////
// PACKAGE TEST
Expand Down
15 changes: 10 additions & 5 deletions cake/packaging.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
using System.Xml;
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

using System.Xml;

//////////////////////////////////////////////////////////////////////
// PACKAGE METADATA
Expand All @@ -9,8 +14,8 @@ static readonly string[] AUTHORS = new[] { "Charlie Poole" };
static readonly string[] OWNERS = new[] { "Charlie Poole" };
const string DESCRIPTION = "This extension allows NUnit to create result files in the V2 format, which is used by many CI servers.";
const string SUMMARY = "NUnit Engine extension for writing test result files in NUnit V2 format.";
const string COPYRIGHT = "Copyright (c) 2016 Charlie Poole";
static readonly string[] RELEASE_NOTES = new [] { "See https://raw.githubusercontent.com/nunit/nunit-v2-result-writer/main/CHANGES.txt" };
const string COPYRIGHT = "Copyright (c) 2016-2021 Charlie Poole";
static readonly string[] RELEASE_NOTES = new [] { "See https://raw.githubusercontent.com/nunit/nunit-v2-result-writer/main/CHANGES.md" };
static readonly string[] TAGS = new[] { "nunit", "test", "testing", "tdd", "runner" };
static readonly Uri PROJECT_URL = new Uri("http://nunit.org");
static readonly Uri ICON_URL = new Uri("https://cdn.rawgit.com/nunit/resources/master/images/icon/nunit_256.png");
Expand Down Expand Up @@ -53,7 +58,7 @@ public void BuildNuGetPackage(BuildParameters parameters)
KeepTemporaryNuSpecFile = false,
Files = new[] {
new NuSpecContent { Source = parameters.ProjectDirectory + "LICENSE.txt" },
new NuSpecContent { Source = parameters.ProjectDirectory + "CHANGES.txt" },
new NuSpecContent { Source = parameters.ProjectDirectory + "CHANGES.md" },
new NuSpecContent { Source = parameters.ProjectDirectory + "net20.engine.addins", Target = "tools" },
new NuSpecContent { Source = parameters.OutputDirectory + "net20/nunit-v2-result-writer.dll", Target = "tools/net20" },
new NuSpecContent { Source = parameters.OutputDirectory + "netcoreapp2.1/nunit-v2-result-writer.dll", Target = "tools/netcoreapp2.1" }
Expand Down Expand Up @@ -93,7 +98,7 @@ public void BuildChocolateyPackage(BuildParameters parameters)
OutputDirectory = parameters.PackageDirectory,
Files = new[] {
new ChocolateyNuSpecContent { Source = parameters.ProjectDirectory + "LICENSE.txt", Target = "tools" },
new ChocolateyNuSpecContent { Source = parameters.ProjectDirectory + "CHANGES.txt", Target = "tools" },
new ChocolateyNuSpecContent { Source = parameters.ProjectDirectory + "CHANGES.md", Target = "tools" },
new ChocolateyNuSpecContent { Source = parameters.ProjectDirectory + "VERIFICATION.txt", Target = "tools" },
new ChocolateyNuSpecContent { Source = parameters.ProjectDirectory + "net20.engine.addins", Target = "tools" },
new ChocolateyNuSpecContent { Source = parameters.OutputDirectory + "net20/nunit-v2-result-writer.dll", Target = "tools/net20" },
Expand Down
7 changes: 6 additions & 1 deletion cake/parameters.cake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#load "./versioning.cake"
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

#load "./versioning.cake"
#load "./packaging.cake"
#load "./package-checks.cake"
#load "./package-tests.cake"
Expand Down
2 changes: 1 addition & 1 deletion cake/test-reports.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and TestCentric GUI contributors.
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

Expand Down
2 changes: 1 addition & 1 deletion cake/test-results.cake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and TestCentric GUI contributors.
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

Expand Down
5 changes: 5 additions & 0 deletions cake/test-runner.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

#load ./assertions.cake
#load ./constraints.cake

Expand Down
5 changes: 5 additions & 0 deletions cake/tests.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

const string NUNIT2_RESULT_SCHEMA = "NUnit2Results.xsd";

public class ResultWriterTests
Expand Down
5 changes: 5 additions & 0 deletions cake/utilities.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

//////////////////////////////////////////////////////////////////////
// GLOBALLY ACCESSIBLE UTILITY METHODS
//////////////////////////////////////////////////////////////////////
Expand Down
5 changes: 5 additions & 0 deletions cake/versioning.cake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// ***********************************************************************
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

using System.Text.RegularExpressions;

public class BuildVersion
Expand Down
5 changes: 5 additions & 0 deletions nunit-v2-result-writer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
build.cmd = build.cmd
build.ps1 = build.ps1
build.sh = build.sh
CHANGES.md = CHANGES.md
GitReleaseManager.yaml = GitReleaseManager.yaml
GitVersion.yml = GitVersion.yml
LICENSE.txt = LICENSE.txt
net20.engine.addins = net20.engine.addins
NuGet.config = NuGet.config
NUnit2Results.xsd = NUnit2Results.xsd
README.md = README.md
VERIFICATION.txt = VERIFICATION.txt
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "mock-assembly", "src\mock-assembly\mock-assembly.csproj", "{6D160D73-AB70-47F3-9837-BB3A06125FFB}"
Expand Down
22 changes: 2 additions & 20 deletions src/extension/NUnit2ResultSummary.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
// ***********************************************************************
// Copyright (c) 2014 Charlie Poole
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// Copyright (c) Charlie Poole and contributors.
// Licensed under the MIT License. See LICENSE.txt in root directory.
// ***********************************************************************

using System;
Expand Down
Loading

0 comments on commit 5f56c28

Please sign in to comment.