Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure-xunit: support for the second reporter and xunit 2.5.0. Updated packaging and AspectInjector (fixes 368) #382

Merged
merged 16 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
run: dotnet restore ${{ env.SOLUTION_PATH }} --packages ${{ env.RESTORE_OUTPUT_PATH }}

- name: 'Build project using dotnet'
run: dotnet build ${{ env.SOLUTION_PATH }} --no-restore --configuration ${{ env.BUILD_CONFIGURATION }}
run: dotnet build ${{ env.SOLUTION_PATH }} --no-restore --configuration ${{ env.BUILD_CONFIGURATION }} -p:ContinuousIntegrationBuild=true

- name: 'Pack project'
run: dotnet pack ${{ env.SOLUTION_PATH }} --no-restore --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --include-symbols --include-source -p:PackageOutputPath=${{ env.PACKAGE_OUTPUT_PATH }}
run: dotnet pack ${{ env.SOLUTION_PATH }} --no-restore --no-build --configuration ${{ env.BUILD_CONFIGURATION }} -p:PackageOutputPath=${{ env.PACKAGE_OUTPUT_PATH }}

- name: 'NuGet publish'
run: |
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,17 @@ jobs:
git config --global user.email [email protected]
- name: "Set release version"
run: |
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ env.release_version }}</Version>|g' ./Allure.Net.Commons/Allure.Net.Commons.csproj
cat ./Allure.Net.Commons/Allure.Net.Commons.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ env.release_version }}</Version>|g' ./Allure.SpecFlowPlugin/Allure.SpecFlowPlugin.csproj
cat ./Allure.SpecFlowPlugin/Allure.SpecFlowPlugin.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ env.release_version }}</Version>|g' ./Allure.XUnit/Allure.XUnit.csproj
cat ./Allure.XUnit/Allure.XUnit.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ env.release_version }}</Version>|g' ./Allure.NUnit/Allure.NUnit.csproj
cat ./Allure.NUnit/Allure.NUnit.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ env.release_version }}</Version>|g' ./Directory.Build.props
cat ./Directory.Build.props
- name: "Commit release version and create tag"
run: |
git commit -am "release ${{ env.release_version }}"
git tag ${{ env.release_version }}
git push origin ${{ env.release_version }}
- name: "Set next development version"
run: |
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ inputs.nextVersion }}-SNAPSHOT</Version>|g' ./Allure.Net.Commons/Allure.Net.Commons.csproj
cat ./Allure.Net.Commons/Allure.Net.Commons.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ inputs.nextVersion }}-SNAPSHOT</Version>|g' ./Allure.SpecFlowPlugin/Allure.SpecFlowPlugin.csproj
cat ./Allure.SpecFlowPlugin/Allure.SpecFlowPlugin.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ inputs.nextVersion }}-SNAPSHOT</Version>|g' ./Allure.XUnit/Allure.XUnit.csproj
cat ./Allure.XUnit/Allure.XUnit.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ inputs.nextVersion }}-SNAPSHOT</Version>|g' ./Allure.NUnit/Allure.NUnit.csproj
cat ./Allure.NUnit/Allure.NUnit.csproj
sed -i -e '/<PropertyGroup>/,/<\/PropertyGroup>/ s|<Version>[0-9a-zA-Z.|-]*</Version>|<Version>${{ inputs.nextVersion }}-SNAPSHOT</Version>|g' ./Directory.Build.props
cat ./Directory.Build.props
- name: "Commit next development version and push it"
run: |
git commit -am "set next development version ${{ inputs.nextVersion }}"
Expand Down
58 changes: 28 additions & 30 deletions Allure.Features/Allure.Features.csproj
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
<OutputPath>bin</OutputPath>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<OutputPath>bin</OutputPath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Castle.Core" Version="4.4.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.SharedSteps" Version="3.0.7" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.8" />
<PackageReference Include="SpecFlow.NUnit" Version="3.9.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Allure.Net.Commons\Allure.Net.Commons.csproj" />
<ProjectReference Include="..\Allure.SpecFlowPlugin\Allure.SpecFlowPlugin.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="allureConfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="specflow.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Castle.Core" Version="4.4.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="SpecFlow.SharedSteps" Version="3.0.7" />
<PackageReference Include="SpecFlow.Tools.MsBuild.Generation" Version="3.9.8" />
<PackageReference Include="SpecFlow.NUnit" Version="3.9.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Allure.Net.Commons\Allure.Net.Commons.csproj" />
<ProjectReference Include="..\Allure.SpecFlowPlugin\Allure.SpecFlowPlugin.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="allureConfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="specflow.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
44 changes: 21 additions & 23 deletions Allure.NUnit.Examples/Allure.NUnit.Examples.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Allure.NUnit\Allure.NUnit.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Allure.NUnit\Allure.NUnit.csproj" />
</ItemGroup>

<ItemGroup>
<Resource Include="allureConfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="AllureIgnoredTest.cs" />
<None Include="./../img/Allure-Color.png" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<Resource Include="allureConfig.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Resource>
<Resource Include="AllureIgnoredTest.cs" />
<None Include="./../img/Allure-Color.png" PackagePath="\">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
15 changes: 1 addition & 14 deletions Allure.NUnit/Allure.NUnit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,20 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11</LangVersion>
<Version>2.10-SNAPSHOT</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Company>Qameta Software</Company>
<IsPackable>true</IsPackable>
<Authors>Nick Chursin</Authors>
<Description>NUnit attributes extenstions for Allure</Description>
<PackageId>Allure.NUnit</PackageId>
<AssemblyName>Allure.NUnit</AssemblyName>
<RootNamespace>NUnit.Allure</RootNamespace>
<PackageProjectUrl>https://www.nuget.org/packages/Allure.NUnit</PackageProjectUrl>
<RepositoryUrl>https://github.com/allure-framework/allure-csharp</RepositoryUrl>
<PackageTags>allure nunit</PackageTags>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>Allure-N-Color.png</PackageIcon>
<IncludeSymbols>true</IncludeSymbols>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspectInjector" Version="2.8.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit.Engine.Api" Version="3.15.2" />
</ItemGroup>
Expand Down
50 changes: 24 additions & 26 deletions Allure.Net.Commons.Tests/Allure.Net.Commons.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>11</LangVersion>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Castle.Core" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Castle.Core" Version="5.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.1" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Allure.Net.Commons\Allure.Net.Commons.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Allure.Net.Commons\Allure.Net.Commons.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="actual.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="diff.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="expected.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="actual.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="diff.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="expected.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
25 changes: 3 additions & 22 deletions Allure.Net.Commons/Allure.Net.Commons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,21 @@

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>11</LangVersion>
<Version>2.10-SNAPSHOT</Version>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
<Authors>Alexander Bakanov, Nikolay Laptev</Authors>
<Company>Qameta Software</Company>
<Product />
<Description>.NET implementation of Allure java-commons</Description>
<Description>Provides common facilities to build allure integrations for .NET test frameworks</Description>
<PackageProjectUrl>https://www.nuget.org/packages/Allure.Net.Commons</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/allure-framework/allure-csharp</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>allure</PackageTags>
<PackageIcon>Allure-Color.png</PackageIcon>
<SignAssembly>False</SignAssembly>
<DelaySign>False</DelaySign>
<AssemblyOriginatorKeyFile>key.snk</AssemblyOriginatorKeyFile>
<LangVersion>default</LangVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspectInjector" Version="2.8.1" />
</ItemGroup>

<ItemGroup>
<None Include="README.md" Pack="true" PackagePath="\" />
<None Include="./../img/Allure-Color.png" Pack="true" PackagePath="\" />
<Content Include="allureConfig.Template.json" Pack="true" />
<PackageReference Include="AspectInjector" Version="2.8.2" />
<PackageReference Include="MimeTypesMap" Version="1.0.8" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
Expand Down
3 changes: 0 additions & 3 deletions Allure.Net.Commons/AllureLifecycle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading;
using Allure.Net.Commons.Configuration;
using Allure.Net.Commons.Storage;
Expand All @@ -14,8 +13,6 @@

#nullable enable

[assembly: InternalsVisibleTo("Allure.Net.Commons.Tests")]

namespace Allure.Net.Commons;

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions Allure.Net.Commons/Internal/AssemblyAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Allure.Net.Commons.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
4 changes: 0 additions & 4 deletions Allure.Net.Commons/Writer/FileSystemResultsWriter.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Threading;
using Allure.Net.Commons.Configuration;
using Allure.Net.Commons.Helpers;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

[assembly: InternalsVisibleTo("Allure.Net.Commons.Tests")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]

namespace Allure.Net.Commons.Writer
{
internal class FileSystemResultsWriter : IAllureResultsWriter
Expand Down
46 changes: 22 additions & 24 deletions Allure.SpecFlowPlugin.Tests/Allure.SpecFlowPlugin.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,31 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>11</LangVersion>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Allure.SpecFlowPlugin\Allure.SpecFlowPlugin.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Allure.SpecFlowPlugin\Allure.SpecFlowPlugin.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="allureConfigStepArguments.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="allureConfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="allureConfigWithInvalidRegex.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="allureConfigStepArguments.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="allureConfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="allureConfigWithInvalidRegex.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Loading
Loading