Skip to content

Commit 00b24fe

Browse files
committed
chore: generate badge with test results
1 parent e6c27e1 commit 00b24fe

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

.github/workflows/test-report.yml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,27 @@ jobs:
1818
name: test-results
1919
run-id: ${{ github.event.workflow_run.id }}
2020
github-token: ${{ secrets.GITHUB_TOKEN }}
21-
- name: Test Summary
22-
uses: test-summary/action@v2
21+
- id: parse_tests
22+
name: parse test results
23+
uses: QwerMike/xpath-action@v1
2324
with:
24-
paths: "*.xml"
25-
if: always()
26-
# - uses: dorny/test-reporter@v2
27-
# with:
28-
# artifact: test-results
29-
# name: Tests
30-
# path: "*.xml"
31-
# reporter: java-junit
25+
filename: "test-results.xml"
26+
expression: "//testsuites/@tests"
27+
- id: parse_failures
28+
name: parse test results
29+
uses: QwerMike/xpath-action@v1
30+
with:
31+
filename: "test-results.xml"
32+
expression: "//testsuites/@failures"
33+
- name: Update test-results gist
34+
uses: schneegans/[email protected]
35+
with:
36+
auth: ${{ secrets.GIST_SECRET }}
37+
gistID: 26882516c7ac38bf94a81784f966bd86
38+
filename: node-api-zig-test-badge.json
39+
label: "test"
40+
namedLogo: "zig"
41+
message: "${{steps.parse_tests.outputs.result}} tests / ${{steps.parse_failures.outputs.result}} failures"
42+
color: "#F7A41D"
43+
44+

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
12
The `node-api` Zig package provides [Node-API](https://nodejs.org/api/n-api.html) bindings for writing idiomatic Zig addons for V8-based runtimes like Node.JS or Bun.
23
Thanks to its conventions-based approach it bridges the gap seamlessly, with almost no Node-API specific code!
34

5+
![test-badge](https://img.shields.io/endpoint?url=https%3A%2F%2Fgist.githubusercontent.com%2Ftypesafe%2F26882516c7ac38bf94a81784f966bd86%2Fraw%2F0dcb989b94e9bd71c2192e2e34b7979246340999%2Fnode-api-zig-test-badge.json)
6+
7+
48
TODO:
59

610
- [ ] auto-register class for members of type `type`.

0 commit comments

Comments
 (0)