Skip to content

Commit

Permalink
CI: set up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ForNeVeR committed Oct 25, 2024
1 parent d2b90c3 commit 147d5f7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Main

on:
push:
Expand All @@ -7,7 +7,7 @@ on:
branches: [ master ]

jobs:
build:
main:

runs-on: ubuntu-latest

Expand All @@ -25,6 +25,10 @@ jobs:
- name: Build
run: dotnet build --configuration Release --no-restore -property:VERSION_POSTFIX=".${{ github.run_number }}"
working-directory: src

- name: Test
run: dotnet test --configuration Release --no-build
working-directory: src

- name: Publish net461
run: dotnet publish --framework net461 --configuration Release --no-restore
Expand Down
6 changes: 6 additions & 0 deletions src/Refasmer.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefasmerCliTool", "Refasmer
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RefasmerTestAssembly", "RefasmerTestAssembly\RefasmerTestAssembly.csproj", "{B23C2DDC-7FEC-4C37-ABBF-9C16AEABF911}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Refasmer.Tests", "..\tests\Refasmer.Tests\Refasmer.Tests.csproj", "{58090E13-68B1-4D20-B316-B9A9154E6AE2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -34,5 +36,9 @@ Global
{B23C2DDC-7FEC-4C37-ABBF-9C16AEABF911}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B23C2DDC-7FEC-4C37-ABBF-9C16AEABF911}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B23C2DDC-7FEC-4C37-ABBF-9C16AEABF911}.Release|Any CPU.Build.0 = Release|Any CPU
{58090E13-68B1-4D20-B316-B9A9154E6AE2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58090E13-68B1-4D20-B316-B9A9154E6AE2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58090E13-68B1-4D20-B316-B9A9154E6AE2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58090E13-68B1-4D20-B316-B9A9154E6AE2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
19 changes: 19 additions & 0 deletions tests/Refasmer.Tests/Refasmer.Tests.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit.Analyzers" Version="3.3.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions tests/Refasmer.Tests/Usings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
global using NUnit.Framework;

0 comments on commit 147d5f7

Please sign in to comment.