Skip to content

Commit 7ab7633

Browse files
authored
Add DASL testing harness to CI workflow (#97)
1 parent 31d4664 commit 7ab7633

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ permissions:
77

88
env:
99
UV_PYTHON: 3.8 # minimum supported version
10+
DASL_TESTING_REF: "56f7fd74a8eb0955670dab139034e845329dca57"
1011

1112
jobs:
1213
unit_tests:
@@ -29,3 +30,41 @@ jobs:
2930

3031
- name: Run Tests.
3132
run: uv run pytest
33+
34+
- name: Checkout dasl-testing.
35+
uses: actions/checkout@v4
36+
with:
37+
repository: hyphacoop/dasl-testing
38+
path: dasl-testing
39+
ref: ${{ env.DASL_TESTING_REF }}
40+
41+
- name: Run DASL Python harness.
42+
working-directory: dasl-testing/harnesses/python
43+
env:
44+
UV_PYTHON: "3.13" # DASL testing requires Python 3.13+
45+
run: |
46+
RESULT_JSON=$(uv run --with cbor2 python main.py libipld)
47+
48+
{
49+
echo "## DASL Results"
50+
echo
51+
echo "Metadata:"
52+
echo
53+
echo "- Link: $(echo "$RESULT_JSON" | jq -r '.metadata.link')"
54+
echo "- Version: $(echo "$RESULT_JSON" | jq -r '.metadata.version')"
55+
echo
56+
echo "### Per-file summary"
57+
echo
58+
echo "| File | Total | Passed | Failed |"
59+
echo "|------|-------|--------|--------|"
60+
echo "$RESULT_JSON" | jq -r '
61+
.files
62+
| to_entries[]
63+
| .key as $file
64+
| ( [ .value[] | .pass ] ) as $passes
65+
| ($passes | length) as $total
66+
| ($passes | map(select(. == true)) | length) as $passed
67+
| ($total - $passed) as $failed
68+
| "| \($file) | \($total) | \($passed) | \($failed) |"
69+
'
70+
} >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)