samples: add EF/ADO Sqlite samples (deterministic EF pattern + ADO re… #34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
branches: [ "*" ] | |
jobs: | |
build: | |
if: github.actor != 'dependabot[bot]' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore dependencies | |
run: dotnet restore KeelMatrix.QueryWatch.sln | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --configuration Release --no-build --collect:"XPlat Code Coverage" --results-directory ./artifacts/TestResults | |
- name: QueryWatch gate (optional - JSON) | |
shell: pwsh | |
run: | | |
if (Test-Path "artifacts/qwatch.report.json") { | |
dotnet run --project tools/KeelMatrix.QueryWatch.Cli -- --input artifacts/qwatch.report.json --max-queries 50 | |
} else { | |
Write-Host "No QueryWatch JSON found; skipping QueryWatch gate." | |
} | |
- name: Pack | |
run: dotnet pack --configuration Release --no-build --include-symbols --p:SymbolPackageFormat=snupkg --output ./artifacts/packages | |
- name: Upload packages | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nuget-packages | |
path: ./artifacts/packages | |
if-no-files-found: error | |
overwrite: true | |
- name: Verify formatting | |
run: dotnet format --verify-no-changes | |
- name: Check for vulnerable dependencies | |
run: dotnet list KeelMatrix.QueryWatch.sln package --vulnerable | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: csharp | |
- name: Build for CodeQL | |
uses: github/codeql-action/autobuild@v3 | |
- name: Analyze with CodeQL | |
uses: github/codeql-action/analyze@v3 | |
# --- Optional companion gates (disabled by default) --- | |
# - name: Unrecorded HTTP Call gate | |
# if: always() | |
# run: | | |
# echo "TODO: Fail if tests performed network calls without cassettes" | |
# | |
# - name: Snapshot PII Scan / Drift | |
# if: always() | |
# run: | | |
# echo "TODO: Scan changed fixture files for PII patterns" |