Skip to content
Closed
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
17 changes: 13 additions & 4 deletions .github/actions/install-and-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,23 @@ runs:
with:
nuget-version: 6.11.0
- name: Install dotnet
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@v5 # Try v5 for better MSBuild handling
with:
dotnet-version: '6.x'


- name: Install Mono on MacOS
run: brew install mono
- name: Install Mono on MacOS with MSBuild environment setup
if: runner.os == 'macOS'
shell: 'bash'
run: |
echo "Installing modern Mono with .NET MSBuild integration"
brew install mono

# Set MSBuild environment variables to use .NET SDK MSBuild instead of Mono's
echo "MSBUILD_EXE_PATH=$HOME/.dotnet/sdk/6.0.428/MSBuild.dll" >> $GITHUB_ENV
echo "MSBuildSDKsPath=$HOME/.dotnet/sdk/6.0.428/Sdks" >> $GITHUB_ENV

echo "Configured to use .NET MSBuild with Mono runtime"
shell: bash

- name: Install Mono on Linux
run: |
Expand Down
25 changes: 23 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,27 @@ jobs:
- name: Run Go vet
run: go vet -v ./...

NuGet_Unit_Tests_Fast:
name: "[${{ matrix.os }}] NuGet Unit Tests (Fast Check)"
needs: Pretest
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ macos ] # Only test macOS where the issue occurs
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Install and Setup Dependencies
uses: ./.github/actions/install-and-setup

# Test only NuGet unit tests for fast feedback
- name: Run NuGet tests only
run: go test ./sca/bom/buildinfo/technologies/nuget -v -timeout 5m

Unit_Tests:
name: "[${{ matrix.os }}] Unit Tests"
needs: Pretest
Expand Down Expand Up @@ -98,6 +119,8 @@ jobs:
matrix:
os: [ ubuntu, windows, macos ]
suite:
- name: 'C/C++/C# Suite (Conan, NuGet, Dotnet)'
testFlags: '--test.audit.C'
- name: 'General Suite (Detection, MultiTech, NoTech...)'
testFlags: '--test.audit'
- name: 'JAS Suite'
Expand All @@ -110,8 +133,6 @@ jobs:
testFlags: '--test.audit.Java'
- name: 'Go Suite (Go Modules, Dep, Glide)'
testFlags: '--test.audit.Go'
- name: 'C/C++/C# Suite (Conan, NuGet, Dotnet)'
testFlags: '--test.audit.C'
- name: 'Cocoapods Suite'
testFlags: '--test.audit.Cocoapods'
- name: 'Swift Suite'
Expand Down
Loading