Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Locate solution
id: sln
run: |
SLN=$(find . \( -name '*.slnx' -o -name '*.sln' \) -not -path '*/bin/*' -not -path '*/obj/*' | head -1)
if [ -z "$SLN" ]; then
SLN=$(find . \( -name '*.csproj' -o -name '*.fsproj' \) -not -path '*/bin/*' -not -path '*/obj/*' | head -1)
fi
echo "Target: $SLN"
echo "path=$SLN" >> "$GITHUB_OUTPUT"

- name: Build
run: dotnet build "${{ steps.sln.outputs.path }}" -c Release

- name: Test
run: |
if grep -rlq "Microsoft.NET.Test.Sdk" --include='*.csproj' --include='*.fsproj' .; then
dotnet test "${{ steps.sln.outputs.path }}" -c Release --verbosity normal
else
echo "No test projects found — skipping tests."
fi
3 changes: 3 additions & 0 deletions build/BuildSphere.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@
<ItemGroup>
<PackageReference Include="Nuke.Common" Version="10.1.0" />
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="10.0.6" />
<!-- Transitive dependency pins to clear NuGetAudit advisories (see GHSA-g4vj-cjjj-v7hg, GHSA-23rf-6693-g89p and related) -->
<PackageReference Include="NuGet.Packaging" Version="6.12.5" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="9.0.18" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion build/INukeBuildSphere.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

public interface INukeBuildSphere : INukeBuild
{
[Solution(SuppressBuildProjectCheck = true)]
[Solution]
Solution Solution
=> TryGetValue(() => Solution);

Expand Down
5 changes: 1 addition & 4 deletions build/Tasks/ITestJavaScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ public interface ITestJavaScript : INukeBuildSphere
.Executes(() =>
{
Information("Testing JavaScript with Jest...");

// Redirect NPM output to Serilog
NpmLogger = (outputType, text) => Log.Information(text);


// Define the path to the Jest tests directory
var jestTestProjects = RootDirectory
.GlobDirectories("**/*.JsTests")
Expand Down
Loading