Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
nitro-neal committed Jan 23, 2024
1 parent 8716a8b commit 56daf0f
Show file tree
Hide file tree
Showing 23 changed files with 1,713 additions and 37 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: build html report

on:
push:
workflow_dispatch:

jobs:
build-report:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pages: write
steps:
- uses: actions/checkout@v3
- name: Checkout web5-spec repo
uses: actions/checkout@v3
with:
repository: TBD54566975/web5-spec
path: web5-spec
- name: Copy test-vectors
run: cp -r web5-spec/test-vectors .
- uses: actions/setup-go@v4
- name: build html
run: |
cd reports
go run ./cmd/build-html
cp -r ./static/* _site
mv _site ../
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CICD_ROBOT_GITHUB_APP_NAME: ${{ secrets.CICD_ROBOT_GITHUB_APP_NAME }}
CICD_ROBOT_GITHUB_APP_PRIVATE_KEY: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }}
CICD_ROBOT_GITHUB_APP_ID: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }}
CICD_ROBOT_GITHUB_APP_INSTALLATION_ID: ${{ secrets.CICD_ROBOT_GITHUB_APP_INSTALLATION_ID }}
- uses: actions/upload-pages-artifact@v2
- name: deploy GitHub Pages
uses: actions/deploy-pages@v3
if: github.ref == 'refs/heads/main'
13 changes: 13 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Lint

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: DavidAnson/markdownlint-cli2-action@v13
with:
globs: "**/*.md"
40 changes: 40 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Deploy PR previews
concurrency: preview-${{ github.ref }}
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout web5-spec repo
uses: actions/checkout@v3
with:
repository: TBD54566975/web5-spec
path: web5-spec
- name: Copy test-vectors
run: cp -r web5-spec/test-vectors .
- name: build html
run: |
cd reports
go run ./cmd/build-html
cp -r ./static/* _site
mv _site ../
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CICD_ROBOT_GITHUB_APP_NAME: ${{ secrets.CICD_ROBOT_GITHUB_APP_NAME }}
CICD_ROBOT_GITHUB_APP_PRIVATE_KEY: ${{ secrets.CICD_ROBOT_GITHUB_APP_PRIVATE_KEY }}
CICD_ROBOT_GITHUB_APP_ID: ${{ secrets.CICD_ROBOT_GITHUB_APP_ID }}
CICD_ROBOT_GITHUB_APP_INSTALLATION_ID: ${{ secrets.CICD_ROBOT_GITHUB_APP_INSTALLATION_ID }}
if: github.event.action != 'closed'
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: .
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto
4 changes: 4 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config:
line-length: false
no-duplicate-heading:
siblings_only: true
40 changes: 3 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,4 @@
# $PROJECT_NAME README
# SDK Report Runner

Congrats, project leads! You got a new project to grow!

This stub is meant to help you form a strong community around your work. It's yours to adapt, and may
diverge from this initial structure. Just keep the files seeded in this repo, and the rest is yours to evolve!

## Introduction

Orient users to the project here. This is a good place to start with an assumption
that the user knows very little - so start with the Big Picture and show how this
project fits into it. It may be good to reference/link the broader architecture in the
`collaboration` repo or the developer site here.

Then maybe a dive into what this project does.

Diagrams and other visuals are helpful here. Perhaps code snippets showing usage.

Project leads should complete, alongside this `README`:
* [CODEOWNERS](./CODEOWNERS) - set project lead(s)
* [CONTRIBUTING.md](./CONTRIBUTING.md) - Fill out how to: install prereqs, build, test, run, access CI, chat, discuss, file issues
* [Bug-report.md](.github/ISSUE_TEMPLATE/bug-report.md) - Fill out `Assignees` add codeowners @names
* [config.yml](.github/ISSUE_TEMPLATE/config.yml) - remove "(/add your discord channel..)" and replace the url with your Discord channel if applicable

The other files in this template repo may be used as-is:
* [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)
* [GOVERNANCE.md](./GOVERNANCE.md)
* [LICENSE](./LICENSE)

## Project Resources

| Resource | Description |
| ------------------------------------------ | ------------------------------------------------------------------------------ |
| [CODEOWNERS](./CODEOWNERS) | Outlines the project lead(s) |
| [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) | Expected behavior for project contributors, promoting a welcoming environment |
| [CONTRIBUTING.md](./CONTRIBUTING.md) | Developer guide to build, test, run, access CI, chat, discuss, file issues |
| [GOVERNANCE.md](./GOVERNANCE.md) | Project governance |
| [LICENSE](./LICENSE) | Apache License, Version 2.0 |
## Overview
The SDK Report Runner is a specialized tool designed to evaluate SDKs against predefined test vectors. This repository is structured to clone submodules containing test vectors, subsequently generating a comprehensive report to ascertain if the SDK passes the specified tests.
16 changes: 16 additions & 0 deletions reports/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SDK Feature Report Generator

This tool reads junit XML reports from different SDKs and generates an HTML report showing which SDKs support which features.

`./cmd/build-html` will iterate over the repos listed in `sdk.go` and download the most recent junit artifact. It will read
all junit results from it and produce a report to `_site/index.html`. For local testing, generate a
[GitHub Personal Access Token](https://github.com/settings/tokens?type=beta) and put it in an environment variable named
`GITHUB_TOKEN`. It doesn't need any special permissions ("Public Repositories (read-only)"). Note that a GitHub app (explained below) can also be used.

`./cmd/sync-vectors` will check the `main` branch of all SDKs listed in `sdks.go` and ensure their vectors match the ones in this repo.
For local testing, a [GitHub App](https://github.com/settings/apps) must be created. Put it's credentials in the following environment variables:

* `CICD_ROBOT_GITHUB_APP_ID` - shown on the edit page of the app, where you are sent right after app creation.
* `CICD_ROBOT_GITHUB_APP_PRIVATE_KEY` - this should be the contents of the private key, not the path to the file.
* `CICD_ROBOT_GITHUB_APP_NAME` - this is used as a display name and should match the name in the URL of the edit page for the app.
* `CICD_ROBOT_GITHUB_APP_INSTALLATION_ID` - click "Install App" on the sidebar while editing the app in GitHub to install it on your own account.
Loading

0 comments on commit 56daf0f

Please sign in to comment.