Skip to content

Commit 61ce23c

Browse files
CI on GitHub Actions
1 parent a2ae1f1 commit 61ce23c

6 files changed

Lines changed: 52 additions & 180 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: .NET build
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
13+
runs-on: windows-latest
14+
15+
env:
16+
Solution_Name: RazorEngineCore.sln
17+
Test_Project_Path: RazorEngineCore.Tests
18+
Pack_Project_Path: RazorEngineCore
19+
Configuration: Release
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Build
28+
run: dotnet build $env:Solution_Name --configuration=$env:Configuration
29+
30+
- name: Execute unit tests
31+
run: dotnet test $env:Test_Project_Path --configuration=$env:Configuration --no-build
32+
33+
- name: Pack
34+
run: dotnet pack $env:Pack_Project_Path --configuration=$env:Configuration --no-build -o artifacts -p:symbolPackageFormat=snupkg --include-symbols
35+
36+
- name: Store nupkg
37+
uses: actions/upload-artifact@v2
38+
with:
39+
name: Nuget packages
40+
path: |
41+
artifacts
42+

ExampleAppNet472/App.config

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 9 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.props')" />
4-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
53
<PropertyGroup>
6-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8-
<ProjectGuid>{D27C1578-BFF9-4469-9099-DAF64450BBBE}</ProjectGuid>
94
<OutputType>Exe</OutputType>
10-
<RootNamespace>ExampleFrameworkApp</RootNamespace>
11-
<AssemblyName>ExampleFrameworkApp</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
15-
<Deterministic>true</Deterministic>
16-
<NuGetPackageImportStamp>
17-
</NuGetPackageImportStamp>
5+
<TargetFramework>net472</TargetFramework>
186
</PropertyGroup>
19-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20-
<PlatformTarget>AnyCPU</PlatformTarget>
21-
<DebugSymbols>true</DebugSymbols>
22-
<DebugType>full</DebugType>
23-
<Optimize>false</Optimize>
24-
<OutputPath>bin\Debug\</OutputPath>
25-
<DefineConstants>DEBUG;TRACE</DefineConstants>
26-
<ErrorReport>prompt</ErrorReport>
27-
<WarningLevel>4</WarningLevel>
28-
</PropertyGroup>
29-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30-
<PlatformTarget>AnyCPU</PlatformTarget>
31-
<DebugType>pdbonly</DebugType>
32-
<Optimize>true</Optimize>
33-
<OutputPath>bin\Release\</OutputPath>
34-
<DefineConstants>TRACE</DefineConstants>
35-
<ErrorReport>prompt</ErrorReport>
36-
<WarningLevel>4</WarningLevel>
37-
</PropertyGroup>
38-
<ItemGroup>
39-
<Reference Include="Microsoft.AspNetCore.Razor.Language, Version=5.0.3.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
40-
<HintPath>..\packages\Microsoft.AspNetCore.Razor.Language.5.0.3\lib\netstandard2.0\Microsoft.AspNetCore.Razor.Language.dll</HintPath>
41-
</Reference>
42-
<Reference Include="Microsoft.CodeAnalysis, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Microsoft.CodeAnalysis.Common.3.8.0\lib\netstandard2.0\Microsoft.CodeAnalysis.dll</HintPath>
44-
</Reference>
45-
<Reference Include="Microsoft.CodeAnalysis.CSharp, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
46-
<HintPath>..\packages\Microsoft.CodeAnalysis.CSharp.3.8.0\lib\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
47-
</Reference>
48-
<Reference Include="System" />
49-
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
50-
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
51-
</Reference>
52-
<Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
53-
<HintPath>..\packages\System.Collections.Immutable.5.0.0\lib\net461\System.Collections.Immutable.dll</HintPath>
54-
</Reference>
55-
<Reference Include="System.Core" />
56-
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
57-
<HintPath>..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll</HintPath>
58-
</Reference>
59-
<Reference Include="System.Numerics" />
60-
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
61-
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
62-
</Reference>
63-
<Reference Include="System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
64-
<HintPath>..\packages\System.Reflection.Metadata.5.0.0\lib\net461\System.Reflection.Metadata.dll</HintPath>
65-
</Reference>
66-
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
67-
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
68-
</Reference>
69-
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
70-
<HintPath>..\packages\System.Text.Encoding.CodePages.4.7.1\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
71-
</Reference>
72-
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
73-
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
74-
</Reference>
75-
<Reference Include="System.Xml.Linq" />
76-
<Reference Include="System.Data.DataSetExtensions" />
77-
<Reference Include="Microsoft.CSharp" />
78-
<Reference Include="System.Data" />
79-
<Reference Include="System.Net.Http" />
80-
<Reference Include="System.Xml" />
81-
</ItemGroup>
82-
<ItemGroup>
83-
<Compile Include="Program.cs" />
84-
<Compile Include="Properties\AssemblyInfo.cs" />
85-
</ItemGroup>
86-
<ItemGroup>
87-
<None Include="App.config" />
88-
<None Include="packages.config" />
89-
</ItemGroup>
7+
908
<ItemGroup>
91-
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.Analyzers.dll" />
92-
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.Analyzers.dll" />
9+
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
9310
</ItemGroup>
11+
9412
<ItemGroup>
95-
<ProjectReference Include="..\RazorEngineCore\RazorEngineCore.csproj">
96-
<Project>{1e21186e-49a5-433a-abad-18ced1aa2494}</Project>
97-
<Name>RazorEngineCore</Name>
98-
</ProjectReference>
13+
<ProjectReference Include="..\RazorEngineCore\RazorEngineCore.csproj" />
9914
</ItemGroup>
100-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
101-
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
102-
<PropertyGroup>
103-
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
104-
</PropertyGroup>
105-
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.props'))" />
106-
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.targets'))" />
107-
</Target>
108-
<Import Project="..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.targets" Condition="Exists('..\packages\Microsoft.CodeAnalysis.Analyzers.3.3.0\build\Microsoft.CodeAnalysis.Analyzers.targets')" />
109-
</Project>
15+
16+
</Project>

ExampleAppNet472/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 36 deletions
This file was deleted.

ExampleAppNet472/packages.config

Lines changed: 0 additions & 15 deletions
This file was deleted.

RazorEngineCore/RazorEngineCore.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>net5.0;netstandard2.0</TargetFrameworks>
4-
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
4+
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
55
<Version>2021.7.1</Version>
66
<Authors>Alexander Selishchev, Simon Mourier, William David Cossey, Benjamin Smith, Dag H. Baardsen, krmr, jddj007-hydra</Authors>
77
<PackageProjectUrl>https://github.com/adoconnection/RazorEngineCore</PackageProjectUrl>

0 commit comments

Comments
 (0)