Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/actions/rdcp-conformance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,28 @@ 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
- run: echo "Pass rate: ${{ steps.rdcp.outputs.pass-rate }}%"
```

Quick start (Client SDK)

```ts path=null start=null
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"dist",
"README.md",
"LICENSE",
"scripts/rdcp-conformance.mjs"
"scripts/rdcp-conformance.mjs",
"scripts/conformance-junit.mjs",
"scripts/conformance-badges.mjs"
],
"exports": {
".": {
Expand Down Expand Up @@ -174,6 +176,8 @@
},
"type": "commonjs",
"bin": {
"rdcp-conformance": "scripts/rdcp-conformance.mjs"
"rdcp-conformance": "scripts/rdcp-conformance.mjs",
"rdcp-conformance-junit": "scripts/conformance-junit.mjs",
"rdcp-conformance-badges": "scripts/conformance-badges.mjs"
}
}