Skip to content

Commit

Permalink
Merge pull request #75 from Cray-HPE/open-api
Browse files Browse the repository at this point in the history
added open api tavern coverage
  • Loading branch information
nieuwsma authored Sep 12, 2022
2 parents fbddc25 + b312f2c commit 425d552
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/open-api-tavern-coverage.md.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!-- This file is templated with https://pkg.go.dev/html/template -->

# Open-API Tavern Coverage Report
<table>
<tbody>
<tr>
<td>Endpoint</td>
<td>Method</td>
<td>Test Case Count</td>
<td>Status</td>
</tr>
{{- range $endpoint := .endpoints }}
<tr>
<td>{{$endpoint.url}}</td>
<td>{{$endpoint.method}}</td>
<td>{{$endpoint.count}}</td>
{{- if eq $endpoint.count 0 }}
<td>:x:</td>
{{- end}}
{{- if eq $endpoint.count 1 }}
<td>:warning:</td>
{{- end}}
{{- if gt $endpoint.count 1 }}
<td>:white_check_mark:</td>
{{- end}}
</tr>
{{- end}}
</tbody>
</table>
14 changes: 14 additions & 0 deletions .github/workflows/run_open-api-tavern-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Run Open-API Tavern Coverage
on:
- push # Perform a build of the contents from the branch
- pull_request # Perform a build after merging with the target branch
- workflow_dispatch
jobs:
build_and_release:
uses: Cray-HPE/open-api-tavern-coverage/.github/workflows/run_open-api-tavern-coverage.yaml@v1
#the v1 tag exists now
with:
open-api-file: "api/swagger.yaml"
tavern-file-dir: "test/ct/functional"
api-target-urls: "{capmc_base_url}"

0 comments on commit 425d552

Please sign in to comment.