consolidate the tests locations
This commit is contained in:
@@ -17,7 +17,7 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- 'src/Scanner/__Libraries/StellaOps.Scanner.Benchmark/**'
|
||||
- 'bench/competitors/**'
|
||||
- 'src/__Tests/__Benchmarks/competitors/**'
|
||||
|
||||
env:
|
||||
DOTNET_VERSION: '10.0.x'
|
||||
@@ -62,24 +62,24 @@ jobs:
|
||||
- name: Load corpus manifest
|
||||
id: corpus
|
||||
run: |
|
||||
echo "corpus_path=bench/competitors/corpus/corpus-manifest.json" >> $GITHUB_OUTPUT
|
||||
echo "corpus_path=src/__Tests/__Benchmarks/competitors/corpus/corpus-manifest.json" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Run Stella Ops scanner
|
||||
run: |
|
||||
echo "Running Stella Ops scanner on corpus..."
|
||||
# TODO: Implement actual scan command
|
||||
# stella scan --corpus ${{ steps.corpus.outputs.corpus_path }} --output bench/results/stellaops.json
|
||||
# stella scan --corpus ${{ steps.corpus.outputs.corpus_path }} --output src/__Tests/__Benchmarks/results/stellaops.json
|
||||
|
||||
- name: Run Trivy on corpus
|
||||
run: |
|
||||
echo "Running Trivy on corpus images..."
|
||||
# Process each image in corpus
|
||||
mkdir -p bench/results/trivy
|
||||
mkdir -p src/__Tests/__Benchmarks/results/trivy
|
||||
|
||||
- name: Run Grype on corpus
|
||||
run: |
|
||||
echo "Running Grype on corpus images..."
|
||||
mkdir -p bench/results/grype
|
||||
mkdir -p src/__Tests/__Benchmarks/results/grype
|
||||
|
||||
- name: Calculate metrics
|
||||
run: |
|
||||
@@ -87,14 +87,14 @@ jobs:
|
||||
# dotnet run --project src/Scanner/__Libraries/StellaOps.Scanner.Benchmark \
|
||||
# --calculate-metrics \
|
||||
# --ground-truth ${{ steps.corpus.outputs.corpus_path }} \
|
||||
# --results bench/results/ \
|
||||
# --output bench/results/metrics.json
|
||||
# --results src/__Tests/__Benchmarks/results/ \
|
||||
# --output src/__Tests/__Benchmarks/results/metrics.json
|
||||
|
||||
- name: Generate comparison report
|
||||
run: |
|
||||
echo "Generating comparison report..."
|
||||
mkdir -p bench/results
|
||||
cat > bench/results/summary.json << 'EOF'
|
||||
mkdir -p src/__Tests/__Benchmarks/results
|
||||
cat > src/__Tests/__Benchmarks/results/summary.json << 'EOF'
|
||||
{
|
||||
"timestamp": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
||||
"competitors": ["trivy", "grype", "syft"],
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: benchmark-results-${{ github.run_id }}
|
||||
path: bench/results/
|
||||
path: src/__Tests/__Benchmarks/results/
|
||||
retention-days: 90
|
||||
|
||||
- name: Update claims index
|
||||
@@ -115,7 +115,7 @@ jobs:
|
||||
echo "Updating claims index with new evidence..."
|
||||
# dotnet run --project src/Scanner/__Libraries/StellaOps.Scanner.Benchmark \
|
||||
# --update-claims \
|
||||
# --metrics bench/results/metrics.json \
|
||||
# --metrics src/__Tests/__Benchmarks/results/metrics.json \
|
||||
# --output docs/claims-index.md
|
||||
|
||||
- name: Comment on PR
|
||||
@@ -124,8 +124,8 @@ jobs:
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const metrics = fs.existsSync('bench/results/metrics.json')
|
||||
? JSON.parse(fs.readFileSync('bench/results/metrics.json', 'utf8'))
|
||||
const metrics = fs.existsSync('src/__Tests/__Benchmarks/results/metrics.json')
|
||||
? JSON.parse(fs.readFileSync('src/__Tests/__Benchmarks/results/metrics.json', 'utf8'))
|
||||
: { status: 'pending' };
|
||||
|
||||
const body = `## Benchmark Results
|
||||
@@ -160,7 +160,7 @@ jobs:
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: benchmark-results-${{ github.run_id }}
|
||||
path: bench/results/
|
||||
path: src/__Tests/__Benchmarks/results/
|
||||
|
||||
- name: Verify all claims
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user