From b922358a822ff1e60cfa6467ee72adde8f7b253b Mon Sep 17 00:00:00 2001 From: Doug Fennell Date: Sun, 19 Oct 2025 15:33:40 -0500 Subject: [PATCH 1/2] conformance(action): expose totals and pass-rate as outputs --- .github/actions/rdcp-conformance/action.yml | 37 +++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/actions/rdcp-conformance/action.yml b/.github/actions/rdcp-conformance/action.yml index 2009e7a..451fb17 100644 --- a/.github/actions/rdcp-conformance/action.yml +++ b/.github/actions/rdcp-conformance/action.yml @@ -15,6 +15,23 @@ inputs: required: false default: reports/rdcp.discovery.json +outputs: + tests-passed: + description: Number of tests passed + value: ${{ steps.set.outputs.tests_passed }} + tests-total: + description: Number of tests + value: ${{ steps.set.outputs.tests_total }} + pass-rate: + description: Pass rate percent (rounded) + value: ${{ steps.set.outputs.pass_rate }} + suites-passed: + description: Number of suites passed + value: ${{ steps.set.outputs.suites_passed }} + suites-total: + description: Number of suites + value: ${{ steps.set.outputs.suites_total }} + runs: using: composite steps: @@ -45,6 +62,26 @@ runs: shell: bash run: | node scripts/conformance-badges.mjs || echo 'Badge generation skipped' + - name: Set outputs from results + id: set + shell: bash + run: | + node -e " + const fs=require('fs'); + let r={summary:{}}; + try{ r=JSON.parse(fs.readFileSync('reports/rdcp.results.json','utf8')); }catch(e){} + const s=r.summary||{}; + const p=Number(s.passed||0); + const t=Number(s.total||0); + const sp=Number(s.suitesPassed||0); + const st=Number(s.suitesTotal||0); + const rate=t?Math.round((p/t)*100):0; + console.log('tests_passed='+p); + console.log('tests_total='+t); + console.log('pass_rate='+rate); + console.log('suites_passed='+sp); + console.log('suites_total='+st); + " >> "$GITHUB_OUTPUT" - name: Upload conformance reports uses: actions/upload-artifact@v4 with: From 1acc75429e15f10be434a85eb373b69ee42f64b2 Mon Sep 17 00:00:00 2001 From: Doug Fennell Date: Sun, 19 Oct 2025 16:58:17 -0500 Subject: [PATCH 2/2] docs(conformance): add Action outputs usage (README) and update wiki submodule pointer --- .wiki-edit | 2 +- README.md | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.wiki-edit b/.wiki-edit index 99b0ff2..bd2ce53 160000 --- a/.wiki-edit +++ b/.wiki-edit @@ -1 +1 @@ -Subproject commit 99b0ff2e056aec07aa893bc55ee220ee1b409b29 +Subproject commit bd2ce53a87735f8e15759fd30b0adeec78b72b1d diff --git a/README.md b/README.md index 80040ff..082f975 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,35 @@ First-of-its-kind JavaScript/TypeScript SDK implementing the Runtime Debug Contr ## Install +### Conformance CLI (npx) + +```bash +# Discover /.well-known/rdcp and write gating config +npx rdcp-conformance --base-url=http://localhost:3000 \ + --include-tags=standard --out=reports/rdcp.discovery.json + +# Generate reports after tests +npx rdcp-conformance-junit # writes reports/rdcp.junit.xml +npx rdcp-conformance-badges # writes reports/badges/* +``` + +### Composite Action outputs + +```yaml +- uses: ./.github/actions/rdcp-conformance + with: + base-url: http://service:3000 + id: rdcp + +# Use outputs in subsequent steps/jobs +- run: echo "Pass rate: ${{ steps.rdcp.outputs.pass-rate }}%" && \ + echo "Tests: ${{ steps.rdcp.outputs.tests-passed }}/${{ steps.rdcp.outputs.tests-total }}" + +# Gate deployment on pass-rate +- if: ${{ steps.rdcp.outputs.pass-rate == '100' }} + run: echo "Conformance OK — proceed to deploy" +``` + Quick start (Client SDK) ```ts path=null start=null