Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changes/20260718_cardano_wasm_demo_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project: cardano-wasm

pr: 1318

kind:
- test

description: |
Demo: elm-test suite and Node wasm API regression suite, both wired into the WASM CI workflow.
9 changes: 8 additions & 1 deletion .github/workflows/haskell-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,16 @@ jobs:
- name: Build wallet demo
run: |
cd cardano-wasm/demo
elm-format --validate src/
elm-format --validate src/ tests/
elm-test
./build.sh --wasm-dir ../lib-wrapper --out dist

- name: Demo wasm API regression tests
run: |
cd cardano-wasm/demo/tests/wasm
npm install
node api-regression.mjs

- name: Upload wallet demo
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 1 addition & 0 deletions cardano-wasm/demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist/
elm-stuff/
tests/wasm/node_modules/
10 changes: 7 additions & 3 deletions cardano-wasm/demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ python3 -m http.server -d dist 8080 # any static server works
```
src/ the Elm application
web/ page shell, CSS, and the JS glue that drives the cardano-wasm API
tests/ elm-test unit suite and the Node wasm API regression suite
build.sh compiles the Elm app and assembles a servable directory
```

Expand All @@ -61,6 +62,9 @@ from Elm over HTTPS.

## Development

- Source is `elm-format`-canonical; CI validates it (`elm-format --validate src/`).
- CI builds the demo in the *Haskell CI (WASM)* workflow and the GitHub Pages workflow
publishes the result.
- Source is `elm-format`-canonical; CI validates it (`elm-format --validate src/ tests/`).
- Unit tests for the pure core (bech32, ada ↔ lovelace, balance arithmetic): `elm-test`.
- API regression tests against the built wasm library: see
[`tests/wasm/README.md`](tests/wasm/README.md).
- CI runs all of the above in the *Haskell CI (WASM)* workflow and the GitHub Pages
workflow publishes the built demo.
8 changes: 6 additions & 2 deletions cardano-wasm/demo/elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
"direct": {
"elm-explorations/test": "2.2.1"
},
"indirect": {
"elm/random": "1.0.0"
}
}
}
Loading
Loading