Fix exceptions handling #235
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
Tests: | |
runs-on: windows-latest | |
env: | |
Project_Directory: NiL.JS | |
Solution_Name: $Project_Directory/NiL.JS.csproj | |
Test_Project_Path: Tests/Tests.csproj | |
Nuget_Pack_Output_Directory: nuget | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Install .NET Core 3.1 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.x | |
- name: Install .NET Core 7.0 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
- name: Decode the snk | |
run: | | |
$snk_byte = [System.Convert]::FromBase64String("${{ secrets.SNK_KEY }}") | |
$certificatePath = Join-Path -Path $env:Project_Directory -ChildPath keys.snk | |
[IO.File]::WriteAllBytes("$certificatePath", $snk_byte) | |
- name: Restore dependencies | |
run: | | |
cd ./NiL.JS | |
dotnet clean | |
dotnet restore | |
cd .. | |
- name: Build | |
run: | | |
cd ./NiL.JS | |
dotnet build --no-restore -c Release -property:SignAssembly=false -property:PublicSign=false | |
cd .. | |
- name: Run TinyT4 | |
run: | | |
cd Tests | |
dotnet run --project ..\Utility\tiny-t4\ --framework net7.0 | |
- name: Test .NET Core 3.1 | |
run: | | |
cd Tests | |
dotnet test -c Release -property:TargetFramework=netcoreapp3.1 -property:SignAssembly=false -property:PublicSign=false | |
- name: Test .NET Core 7.0 | |
run: | | |
cd Tests | |
dotnet test -c Release -property:TargetFramework=net7.0 -property:SignAssembly=false -property:PublicSign=false | |
- name: Test .NET Framework 4.6.1 | |
run: | | |
cd Tests | |
dotnet test -c Release -property:TargetFramework=net461 -property:SignAssembly=false -property:PublicSign=false | |
- name: Remove the snk | |
run: Remove-Item -path NiL.JS\keys.snk |