Skip to content

Commit

Permalink
Readme and some report gen changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-lew committed Jan 8, 2024
1 parent 0291a69 commit e4d8b37
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
12 changes: 12 additions & 0 deletions reports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ This tool reads junit XML reports from different SDKs and generates an HTML repo

`./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`

## Tooling

This project uses [hermit](https://cashapp.github.io/hermit/usage/get-started/), an open source toolchain manager, which pins and automatically downloads and installs tooling for a repo, including compiler toolchains, utilities, etc.

To install hermit, run:

```bash
https://github.com/cashapp/hermit/releases/download/stable/install.sh | /bin/bash
```

If using goland or intellij, also install the hermit plugin via [these instructions](https://cashapp.github.io/hermit/usage/ide/).

Check failure on line 20 in reports/README.md

View workflow job for this annotation

GitHub Actions / lint

Files should end with a single newline character

reports/README.md:20:130 MD047/single-trailing-newline Files should end with a single newline character https://github.com/DavidAnson/markdownlint/blob/v0.31.1/doc/md047.md
12 changes: 7 additions & 5 deletions reports/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ func sanatizeHTML(dirty error) string {
}

type htmlTemplateInput struct {
Reports []Report
Tests map[string][]string
Reports []Report
Web5Tests map[string][]string
TbdexTests map[string][]string
}

func WriteHTML(reports []Report, filename string) error {
Expand All @@ -38,13 +39,14 @@ func WriteHTML(reports []Report, filename string) error {
}

templateInput := htmlTemplateInput{
Reports: reports,
Tests: make(map[string][]string),
Reports: reports,
Web5Tests: make(map[string][]string),
TbdexTests: make(map[string][]string),
}

for category, tests := range testmap {
for test := range tests {
templateInput.Tests[category] = append(templateInput.Tests[category], test)
templateInput.Web5Tests[category] = append(templateInput.Web5Tests[category], test)
}
}

Expand Down
2 changes: 1 addition & 1 deletion reports/sdks.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
Name: "tbdex-kt",
Repo: "TBD54566975/tbdex-kt",
ArtifactName: "test-results",
FeatureRegex: regexp.MustCompile(`web5\.sdk\.\w+.TbdexTestVectors(\w+)`),
FeatureRegex: regexp.MustCompile(`tbdex\.sdk\.\w+.TbdexTestVectors(\w+)`),
VectorRegex: regexp.MustCompile(`(\w+)\(\)`),
VectorPath: "test-vectors",
},
Expand Down

0 comments on commit e4d8b37

Please sign in to comment.