Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Build SDKs Version Conformace Matrix Dashboard #15

Build SDKs Version Conformace Matrix Dashboard

Build SDKs Version Conformace Matrix Dashboard #15

name: Build SDKs Version Conformace Matrix Dashboard
on:
workflow_dispatch:
inputs:
specTag:
description: "The tag of the spec, eg: v2.0"
type: string
required: true
specRepo:
description: "TBD Specs"
type: choice
required: true
options:
- web5-spec
- tbdex
sdkReleaseRepo:
description: "The release repo, eg: TBD54566975/web5-rs, TBD54566975/tbdex-js (sdk mode only)"
type: string
required: false
sdkReleasePackageName:
description: "The name of the package that is being released (useful for monorepos, eg: web5-rs releases web5-core-kt)"
type: string
required: false
sdkReleaseTag:
description: "The release tag, eg: v1.23 (sdk mode only)"
type: string
required: false
sdkReleaseJunitFiles:
description: "The name of the artifact that contains the JUnit XML files (sdk mode only)" # kotlin-test-results,
type: string
required: false
sdkReleaseWorkflowRunId:
description: "The run ID of the source workflow that uploaded the tests vectors (sdk mode only)"
type: string
required: false
sdkSuiteNameRegex:
description: "The regex to match the suite name (sdk mode only)"
type: string
required: false
sdkFeatureRegex:
description: "The regex to match the feature name (sdk mode only)"
type: string
required: false
sdkVectorRegex:
description: "The regex to match the vector name (sdk mode only)"
type: string
required: false
permissions:
contents: write
jobs:
update-conformance-table:
concurrency: conformance-table-build # always run one instance of this workflow, to avoid conflicts in the conformance json generation
runs-on: ubuntu-latest
steps:
- name: Check Release Mode Inputs
id: release-mode
run: |
echo "Spec Tag: ${{ inputs.specTag }}"
echo "Spec Repo: TBD ${{ inputs.specRepo }}"
echo "SPEC_FULL_REPO=TBD54566975/${{ inputs.specRepo }}" >> $GITHUB_OUTPUT
if [[ "${{ inputs.sdkReleaseRepo }}" != "" ]]; then
echo "sdkReleaseRepo is present - Release Mode = SDK"
echo "Release Repo Tag: ${{ inputs.sdkReleaseTag }}"
echo "Release JUnit Files Artifact Name: ${{ inputs.sdkReleaseJunitFiles }}"
echo "Release Workflow Run ID: ${{ inputs.sdkReleaseWorkflowRunId }}"
echo "Suite Name Regex: ${{ inputs.sdkSuiteNameRegex }}"
echo "Feature Regex: ${{ inputs.sdkFeatureRegex }}"
echo "Vector Regex: ${{ inputs.sdkVectorRegex }}"
# throw an error if any of the sdk mode inputs are not set
if [[ "${{ inputs.sdkReleaseRepo }}" == "" || "${{ inputs.sdkReleaseTag }}" == "" || "${{ inputs.sdkReleaseJunitFiles }}" == "" || "${{ inputs.sdkReleaseWorkflowRunId }}" == "" || "${{ inputs.sdkSuiteNameRegex }}" == "" || "${{ inputs.sdkFeatureRegex }}" == "" || "${{ inputs.sdkVectorRegex }}" == "" ]]; then
echo "Error: All SDK mode inputs are required"
exit 1
fi
fi
- uses: actions/checkout@v4
- name: Checkout spec repo
uses: actions/checkout@v4
with:
repository: ${{ steps.release-mode.outputs.SPEC_FULL_REPO }}
path: ${{ inputs.specRepo }}
ref: ${{ inputs.specTag }}
- name: Download artifacts
uses: actions/download-artifact@v4
if: ${{ inputs.sdkReleaseRepo != '' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.inputs.sdkReleaseWorkflowRunId }}
name: ${{ inputs.sdkReleaseJunitFiles }}
path: junit-results
- name: Builds conformance table
uses: TBD54566975/sdk-report-runner/.github/actions/specs-report@leordev/conformance # TODO: change before merge
with:
junit-report-paths: junit-results/**/*.xml
spec-path: ${{ inputs.specRepo }}
spec-name: ${{ inputs.specRepo }}
spec-tag: ${{ inputs.specTag }}
release-mode: ${{ inputs.sdkReleaseRepo != '' && 'sdk' || 'spec' }}
release-repo: ${{ inputs.sdkReleaseRepo || steps.release-mode.outputs.SPEC_FULL_REPO }}
release-package-name: ${{ inputs.sdkReleasePackageName }}
release-tag: ${{ inputs.sdkReleaseTag }}
suite-name-regex: ${{ inputs.sdkSuiteNameRegex }}
feature-regex: ${{ inputs.sdkFeatureRegex }}
vector-regex: ${{ inputs.sdkVectorRegex }}
git-token: ${{ secrets.GITHUB_TOKEN }}
# # TODO: remove
# env:
# SKIP_WRITE_CONFORMANCE_JSON: true