Add tests for SBOM generation determinism across multiple formats

- Created `StellaOps.TestKit.Tests` project for unit tests related to determinism.
- Implemented `DeterminismManifestTests` to validate deterministic output for canonical bytes and strings, file read/write operations, and error handling for invalid schema versions.
- Added `SbomDeterminismTests` to ensure identical inputs produce consistent SBOMs across SPDX 3.0.1 and CycloneDX 1.6/1.7 formats, including parallel execution tests.
- Updated project references in `StellaOps.Integration.Determinism` to include the new determinism testing library.
This commit is contained in:
master
2025-12-23 18:56:12 +02:00
committed by StellaOps Bot
parent 7ac70ece71
commit 491e883653
409 changed files with 23797 additions and 17779 deletions

View File

@@ -74,6 +74,48 @@ jobs:
if-no-files-found: ignore
retention-days: 7
# ===========================================================================
# Architecture Lane: Structural rule enforcement (PR-gating)
# ===========================================================================
architecture-tests:
name: Architecture Tests
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET ${{ env.DOTNET_VERSION }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
include-prerelease: true
- name: Restore architecture tests
run: dotnet restore tests/architecture/StellaOps.Architecture.Tests/StellaOps.Architecture.Tests.csproj
- name: Build architecture tests
run: dotnet build tests/architecture/StellaOps.Architecture.Tests/StellaOps.Architecture.Tests.csproj --configuration $BUILD_CONFIGURATION --no-restore
- name: Run Architecture tests
run: |
mkdir -p "$TEST_RESULTS_DIR"
dotnet test tests/architecture/StellaOps.Architecture.Tests/StellaOps.Architecture.Tests.csproj \
--configuration $BUILD_CONFIGURATION \
--no-build \
--logger "trx;LogFileName=architecture-tests.trx" \
--results-directory "$TEST_RESULTS_DIR" \
--verbosity normal
- name: Upload Architecture test results
uses: actions/upload-artifact@v4
if: always()
with:
name: architecture-test-results
path: ${{ env.TEST_RESULTS_DIR }}
if-no-files-found: ignore
retention-days: 7
# ===========================================================================
# Contract Lane: API contract stability tests (PR-gating)
# ===========================================================================
@@ -290,7 +332,7 @@ jobs:
test-summary:
name: Test Results Summary
runs-on: ubuntu-22.04
needs: [unit-tests, contract-tests, integration-tests, security-tests]
needs: [unit-tests, architecture-tests, contract-tests, integration-tests, security-tests]
if: always()
steps:
- name: Download all test results
@@ -303,7 +345,7 @@ jobs:
echo "## Test Lane Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
for lane in unit contract integration security; do
for lane in unit architecture contract integration security; do
result_dir="all-test-results/${lane}-test-results"
if [ -d "$result_dir" ]; then
echo "### ${lane^} Lane: ✅ Passed" >> $GITHUB_STEP_SUMMARY