tests pipeline run attempt
This commit is contained in:
167
.gitea/workflows-archived/registry-compatibility.yml
Normal file
167
.gitea/workflows-archived/registry-compatibility.yml
Normal file
@@ -0,0 +1,167 @@
|
||||
name: registry-compatibility
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'src/ExportCenter/**'
|
||||
- 'src/ReleaseOrchestrator/**/Connectors/Registry/**'
|
||||
- 'src/__Tests/**Registry**'
|
||||
- 'src/__Libraries/StellaOps.Doctor.Plugins.Integration/**'
|
||||
schedule:
|
||||
- cron: '0 4 * * 1' # Weekly on Monday at 4 AM UTC
|
||||
workflow_dispatch: {}
|
||||
|
||||
env:
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
jobs:
|
||||
registry-matrix:
|
||||
name: Registry ${{ matrix.registry }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
registry: [generic-oci, zot, distribution, harbor]
|
||||
fail-fast: false
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "10.0.100"
|
||||
|
||||
- name: Restore dependencies
|
||||
run: |
|
||||
dotnet restore src/__Tests/__Libraries/StellaOps.Infrastructure.Registry.Testing.Tests/StellaOps.Infrastructure.Registry.Testing.Tests.csproj
|
||||
|
||||
- name: Build test project
|
||||
run: |
|
||||
dotnet build src/__Tests/__Libraries/StellaOps.Infrastructure.Registry.Testing.Tests/StellaOps.Infrastructure.Registry.Testing.Tests.csproj --no-restore
|
||||
|
||||
- name: Run compatibility tests for ${{ matrix.registry }}
|
||||
run: |
|
||||
dotnet test src/__Tests/__Libraries/StellaOps.Infrastructure.Registry.Testing.Tests/StellaOps.Infrastructure.Registry.Testing.Tests.csproj \
|
||||
--no-build \
|
||||
--filter "Category=RegistryCompatibility" \
|
||||
--logger "trx;LogFileName=${{ matrix.registry }}-results.trx" \
|
||||
--results-directory TestResults \
|
||||
-- xunit.parallelizeTestCollections=false
|
||||
timeout-minutes: 15
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: registry-compat-${{ matrix.registry }}
|
||||
path: TestResults/
|
||||
retention-days: 30
|
||||
|
||||
compatibility-report:
|
||||
name: Generate Compatibility Report
|
||||
runs-on: ubuntu-latest
|
||||
needs: registry-matrix
|
||||
if: always()
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: TestResults
|
||||
pattern: registry-compat-*
|
||||
|
||||
- name: Generate compatibility matrix
|
||||
run: |
|
||||
echo "# Registry Compatibility Matrix" > compatibility-report.md
|
||||
echo "" >> compatibility-report.md
|
||||
echo "Generated: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> compatibility-report.md
|
||||
echo "" >> compatibility-report.md
|
||||
echo "| Registry | OCI Compliance | Referrers API | Auth | Capabilities | Status |" >> compatibility-report.md
|
||||
echo "|----------|---------------|---------------|------|--------------|--------|" >> compatibility-report.md
|
||||
|
||||
for registry in generic-oci zot distribution harbor; do
|
||||
trx_file="TestResults/registry-compat-${registry}/${registry}-results.trx"
|
||||
if [ -f "$trx_file" ]; then
|
||||
# Count passed/failed from trx file
|
||||
passed=$(grep -c 'outcome="Passed"' "$trx_file" 2>/dev/null || echo "0")
|
||||
failed=$(grep -c 'outcome="Failed"' "$trx_file" 2>/dev/null || echo "0")
|
||||
|
||||
if [ "$failed" -eq "0" ]; then
|
||||
status="Pass"
|
||||
else
|
||||
status="Fail ($failed)"
|
||||
fi
|
||||
else
|
||||
status="No results"
|
||||
fi
|
||||
|
||||
# Referrers API support
|
||||
case $registry in
|
||||
generic-oci) referrers="Fallback" ;;
|
||||
zot|harbor|distribution) referrers="Native" ;;
|
||||
esac
|
||||
|
||||
echo "| $registry | $passed tests | $referrers | Basic | Full | $status |" >> compatibility-report.md
|
||||
done
|
||||
|
||||
echo "" >> compatibility-report.md
|
||||
echo "## Legend" >> compatibility-report.md
|
||||
echo "- **Native**: Full OCI 1.1 referrers API support" >> compatibility-report.md
|
||||
echo "- **Fallback**: Uses tag-based discovery (sha256-{digest}.*)" >> compatibility-report.md
|
||||
|
||||
cat compatibility-report.md
|
||||
|
||||
- name: Upload compatibility report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: compatibility-report
|
||||
path: compatibility-report.md
|
||||
retention-days: 90
|
||||
|
||||
- name: Comment on PR
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const report = fs.readFileSync('compatibility-report.md', 'utf8');
|
||||
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: report
|
||||
});
|
||||
|
||||
doctor-checks:
|
||||
name: Doctor Registry Checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: "10.0.100"
|
||||
|
||||
- name: Build Doctor plugin tests
|
||||
run: |
|
||||
dotnet build src/__Tests/__Libraries/StellaOps.Doctor.Plugins.Integration.Tests/StellaOps.Doctor.Plugins.Integration.Tests.csproj
|
||||
|
||||
- name: Run Doctor check tests
|
||||
run: |
|
||||
dotnet test src/__Tests/__Libraries/StellaOps.Doctor.Plugins.Integration.Tests/StellaOps.Doctor.Plugins.Integration.Tests.csproj \
|
||||
--no-build \
|
||||
--logger "trx;LogFileName=doctor-registry-results.trx" \
|
||||
--results-directory TestResults
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: doctor-registry-checks
|
||||
path: TestResults/
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user