Some checks failed
AOC Guard CI / aoc-guard (push) Has been cancelled
AOC Guard CI / aoc-verify (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
Manifest Integrity / Audit SHA256SUMS Files (push) Has been cancelled
Manifest Integrity / Validate Schema Integrity (push) Has been cancelled
Manifest Integrity / Validate Contract Documents (push) Has been cancelled
Manifest Integrity / Validate Pack Fixtures (push) Has been cancelled
Manifest Integrity / Verify Merkle Roots (push) Has been cancelled
Scanner Analyzers / Build Analyzers (push) Has been cancelled
Scanner Analyzers / Discover Analyzers (push) Has been cancelled
Scanner Analyzers / Test Language Analyzers (push) Has been cancelled
Scanner Analyzers / Validate Test Fixtures (push) Has been cancelled
Scanner Analyzers / Verify Deterministic Output (push) Has been cancelled
Signals CI & Image / signals-ci (push) Has been cancelled
Concelier Attestation Tests / attestation-tests (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Export Center CI / export-ci (push) Has been cancelled
Notify Smoke Test / Notify Unit Tests (push) Has been cancelled
Notify Smoke Test / Notifier Service Tests (push) Has been cancelled
Notify Smoke Test / Notification Smoke Test (push) Has been cancelled
- Introduced `NativeTestBase` class for ELF, PE, and Mach-O binary parsing helpers and assertions. - Created `TestCryptoFactory` for SM2 cryptographic provider setup and key generation. - Implemented `Sm2SigningTests` to validate signing functionality with environment gate checks. - Developed console export service and store with comprehensive unit tests for export status management.
134 lines
3.9 KiB
YAML
134 lines
3.9 KiB
YAML
name: Scanner Analyzers
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.*/**'
|
|
- 'src/Scanner/__Tests/StellaOps.Scanner.Analyzers.*/**'
|
|
pull_request:
|
|
paths:
|
|
- 'src/Scanner/__Libraries/StellaOps.Scanner.Analyzers.*/**'
|
|
- 'src/Scanner/__Tests/StellaOps.Scanner.Analyzers.*/**'
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
DOTNET_VERSION: '10.0.x'
|
|
|
|
jobs:
|
|
discover-analyzers:
|
|
name: Discover Analyzers
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
analyzers: ${{ steps.find.outputs.analyzers }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Find analyzer projects
|
|
id: find
|
|
run: |
|
|
ANALYZERS=$(find src/Scanner/__Libraries -name "StellaOps.Scanner.Analyzers.*.csproj" -exec dirname {} \; | xargs -I {} basename {} | sort -u | jq -R -s -c 'split("\n")[:-1]')
|
|
echo "analyzers=$ANALYZERS" >> $GITHUB_OUTPUT
|
|
|
|
build-analyzers:
|
|
name: Build Analyzers
|
|
runs-on: ubuntu-latest
|
|
needs: discover-analyzers
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
analyzer: ${{ fromJson(needs.discover-analyzers.outputs.analyzers) }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Restore
|
|
run: dotnet restore src/Scanner/__Libraries/${{ matrix.analyzer }}/
|
|
|
|
- name: Build
|
|
run: dotnet build src/Scanner/__Libraries/${{ matrix.analyzer }}/ --no-restore
|
|
|
|
test-lang-analyzers:
|
|
name: Test Language Analyzers
|
|
runs-on: ubuntu-latest
|
|
needs: build-analyzers
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v1
|
|
with:
|
|
bun-version: latest
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Run Bun analyzer tests
|
|
run: |
|
|
if [ -d "src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Bun.Tests" ]; then
|
|
dotnet test src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Bun.Tests/ --verbosity normal
|
|
fi
|
|
|
|
- name: Run Node analyzer tests
|
|
run: |
|
|
if [ -d "src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests" ]; then
|
|
dotnet test src/Scanner/__Tests/StellaOps.Scanner.Analyzers.Lang.Node.Tests/ --verbosity normal
|
|
fi
|
|
|
|
fixture-validation:
|
|
name: Validate Test Fixtures
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Validate fixture structure
|
|
run: |
|
|
find src/Scanner/__Tests -name "expected.json" | while read f; do
|
|
echo "Validating $f..."
|
|
if ! jq empty "$f" 2>/dev/null; then
|
|
echo "Error: Invalid JSON in $f"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
- name: Check fixture completeness
|
|
run: |
|
|
find src/Scanner/__Tests -type d -name "Fixtures" | while read fixtures_dir; do
|
|
echo "Checking $fixtures_dir..."
|
|
find "$fixtures_dir" -mindepth 1 -maxdepth 1 -type d | while read test_case; do
|
|
if [ ! -f "$test_case/expected.json" ]; then
|
|
echo "Warning: $test_case missing expected.json"
|
|
fi
|
|
done
|
|
done
|
|
|
|
determinism-check:
|
|
name: Verify Deterministic Output
|
|
runs-on: ubuntu-latest
|
|
needs: test-lang-analyzers
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
|
|
|
- name: Run determinism tests
|
|
run: |
|
|
# Run scanner on same input twice, compare outputs
|
|
if [ -d "tests/fixtures/determinism" ]; then
|
|
dotnet test --filter "Category=Determinism" --verbosity normal
|
|
fi
|