Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
119 changes: 119 additions & 0 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow will build, test, sign and package a WPF or Windows Forms desktop application
# built on .NET Core.
# To learn how to migrate your existing application to .NET Core,
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework
#
# To configure this workflow:
#
# 1. Configure environment variables
# GitHub sets default environment variables for every workflow run.
# Replace the variables relative to your project in the "env" section below.
#
# 2. Signing
# Generate a signing certificate in the Windows Application
# Packaging Project or add an existing signing certificate to the project.
# Next, use PowerShell to encode the .pfx file using Base64 encoding
# by running the following Powershell script to generate the output string:
#
# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte
# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt'
#
# Open the output file, SigningCertificate_Encoded.txt, and copy the
# string inside. Then, add the string to the repo as a GitHub secret
# and name it "Base64_Encoded_Pfx."
# For more information on how to configure your signing certificate for
# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing
#
# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key".
# See "Build the Windows Application Packaging project" below to see how the secret is used.
#
# For more information on GitHub Actions, refer to https://github.com/features/actions
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
# refer to https://github.com/microsoft/github-actions-for-desktop-apps

name: .NET Core Desktop

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:

strategy:
matrix:
configuration: [Release]

runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on

env:
Solution_Name: SpecNuts # Replace with your solution name, i.e. MyWpfApp.sln.
Test_Project_Path: SpecNuts\tests\SpecNuts.Test.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
Wap_Project_Directory: SpecNuts # Replace with the Wap project directory relative to the solution, i.e. MyWpfApp.Package.

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

# Execute all unit tests in the solution
# - name: Execute unit tests
# run: dotnet test

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Build the application
run: dotnet build $env:Solution_Name /p:Configuration=$env:Configuration -o ${{ env.Wap_Project_Directory }}\AppPackages
env:
Configuration: ${{ matrix.configuration }}

# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: MSIX Package
path: ${{ env.Wap_Project_Directory }}\AppPackages

- name: setup nuget
run: dotnet nuget add source --username kaladinStorm84 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/kaladinstorm84/index.json"
- name: Publish NuGet
# You may pin to the exact commit or the version.
# uses: brandedoutcast/publish-nuget@c12b8546b67672ee38ac87bea491ac94a587f7cc
uses: brandedoutcast/publish-nuget@v2.5.5
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: SpecNuts\SpecNuts\SpecNuts.csproj
# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: SpecNuts.nupkg
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
#VERSION_FILE_PATH: # optional
# Regex pattern to extract version info in a capturing group
#VERSION_REGEX: # optional, default is ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
#VERSION_STATIC: # optional
# Flag to toggle git tagging, enabled by default
#TAG_COMMIT: # optional, default is true
# Format of the git tag, [*] gets replaced with actual version
#TAG_FORMAT: # optional, default is v*
# API key to authenticate with NuGet server
#NUGET_KEY: # optional
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
NUGET_SOURCE: github # optional, default is https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: # optional

Binary file added .vs/ProjectEvaluation/specnuts.metadata.v7.bin
Binary file not shown.
Binary file added .vs/ProjectEvaluation/specnuts.projects.v7.bin
Binary file not shown.
10 changes: 10 additions & 0 deletions .vs/SpecNuts/ColorByRegexConfig.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file contains rules to color document tabs by regular expressions. Each line contains a regular expression that will be tested against a file's full path. All files matching a regular expression will share a color.
// You can customize the color assigned to any group of files by right-clicking the tab and choosing "Set Tab Color."
// Regular expressions will be matched in the order they appear in this file. See https://docs.microsoft.com/en-us/dotnet/standard/base-types/regular-expressions for syntax.
// Regular expressions are matched as case-insensitive by default. You can override this behavior using capture group options like "(?-i:expression)".
// Edit this file and save your changes to see changes immediately applied. Any errors encountered during parsing or evaluating expressions will appear in the Output Window in a pane named "Color by Regular Expression."
^.*\.cs$
^.*\.fs$
^.*\.vb$
^.*\.cp?p?$
^.*\.hp?p?$
Binary file added .vs/SpecNuts/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Binary file added .vs/SpecNuts/v17/.futdcache.v2
Binary file not shown.
Binary file added .vs/SpecNuts/v17/.wsuo
Binary file not shown.
Binary file added .vs/SpecNuts/v17/TestStore/0/000.testlog
Binary file not shown.
Binary file added .vs/SpecNuts/v17/TestStore/0/testlog.manifest
Binary file not shown.
7 changes: 7 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"ExpandedNodes": [
""
],
"SelectedNode": "\\SpecNuts.sln",
"PreviewInSolutionExplorer": false
}
27 changes: 0 additions & 27 deletions SpecNuts.ApprovalTestSuite/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("SpecNuts.ApprovalTestSuite")]
[assembly:
AssemblyDescription(
"A forked from SpecResults.ApprovalTestSuite project to provide the ability to generate json file in cucumber format.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("William Sia")]
[assembly: AssemblyProduct("SpecNuts.ApprovalTestSuite")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -25,17 +12,3 @@
// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("a5289c34-47cc-4acf-80ef-d286a5779959")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
121 changes: 22 additions & 99 deletions SpecNuts.ApprovalTestSuite/SpecNuts.ApprovalTestSuite.csproj
Original file line number Diff line number Diff line change
@@ -1,134 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BBA703FA-94C4-437F-9961-2A321163988A}</ProjectGuid>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SpecResults.ApprovalTestSuite</RootNamespace>
<AssemblyName>SpecResults.ApprovalTestSuite</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Build Nuget Packages|AnyCPU'">
<OutputPath>bin\Build Nuget Packages\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>
</DocumentationFile>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'NuGet|AnyCPU'">
<OutputPath>bin\NuGet\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="ApprovalTests">
<HintPath>..\packages\ApprovalTests.3.0.5\lib\net40\ApprovalTests.dll</HintPath>
</Reference>
<Reference Include="ApprovalUtilities">
<HintPath>..\packages\ApprovalUtilities.3.0.5\lib\net35\ApprovalUtilities.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.6.3.13283, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.ValueTuple">
<HintPath>..\packages\System.ValueTuple.4.3.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="TechTalk.SpecFlow">
<HintPath>..\packages\SpecFlow.2.3.1\lib\net45\TechTalk.SpecFlow.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="TestSuite.feature.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>TestSuite.feature</DependentUpon>
</Compile>
<Compile Include="Steps.ApprovalTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Steps.Definitions.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="approvals\SpecNuts.Json.JsonReporter\approval.txt" />
<Content Include="approvals\SpecNuts.Json.JsonReporter\received.txt" />
<None Include="App.config" />
<Content Include="App.config.transform" />
<None Include="packages.config" />
<None Include="TestSuite.feature">
<None Update="TestSuite.feature">
<Generator>SpecFlowSingleFileGenerator</Generator>
<LastGenOutput>TestSuite.feature.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SpecNuts.Json\SpecNuts.Json.csproj">
<Project>{c830c923-5398-4f28-99c2-1592ee5f4f7b}</Project>
<Name>SpecNuts.Json</Name>
</ProjectReference>
<ProjectReference Include="..\SpecNuts\SpecNuts.csproj">
<Project>{eaba391e-6b65-4e5c-8842-3d71a5f97b4f}</Project>
<Name>SpecNuts</Name>
</ProjectReference>
<ProjectReference Include="..\SpecNuts.Json\SpecNuts.Json.csproj" />
<ProjectReference Include="..\SpecNuts\SpecNuts.csproj" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<ItemGroup>
<PackageReference Include="ApprovalTests" Version="6.0.0" />
<PackageReference Include="ApprovalUtilities" Version="6.0.0" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="SpecFlow" Version="3.9.74" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
<AssemblyTitle>SpecNuts.ApprovalTestSuite</AssemblyTitle>
<Description>A forked from SpecResults.ApprovalTestSuite project to provide the ability to generate json file in cucumber format.</Description>
<Company>William Sia</Company>
<Product>SpecNuts.ApprovalTestSuite</Product>
<Copyright>Copyright © 2016</Copyright>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<Import Project="..\packages\SpecFlow.2.3.1\build\SpecFlow.targets" Condition="Exists('..\packages\SpecFlow.2.3.1\build\SpecFlow.targets')" />
</Project>
1 change: 1 addition & 0 deletions SpecNuts.ApprovalTestSuite/Steps.ApprovalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text;
using ApprovalTests.Core;
using ApprovalTests.Reporters;
using ApprovalTests.Reporters.TestFrameworks;
using SpecNuts;
using Approvals = ApprovalTests.Approvals;

Expand Down
Loading