Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Add playwright test to CI
  • Loading branch information
palas committed Jul 18, 2025
commit 2f4f1cf411cdc1186c46779cc9ab14b68d5adcdd
15 changes: 15 additions & 0 deletions .github/workflows/haskell-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,21 @@ jobs:
run: |
wasm32-wasi-cabal build cardano-wasm --no-semaphore -j1 --ghc-options="-j1"

- name: Prepare example
run: |
cp $(env -u CABAL_CONFIG wasm32-wasi-cabal list-bin exe:cardano-wasm | tail -n1) cardano-wasm/example/
$(wasm32-wasi-ghc --print-libdir)/post-link.mjs -i "$(env -u CABAL_CONFIG wasm32-wasi-cabal list-bin exe:cardano-wasm | tail -n1)" -o cardano-wasm/example/cardano-wasm.js
cp cardano-wasm/lib-wrapper/* cardano-wasm/example/

- uses: rrbutani/use-nix-shell-action@v1
with:
devShell: .#playwright

- name: Run playwright test in example
run: |
httpserver -h localhost -a 127.0.0.1 -p 8080 cardano-wasm/example &
playwright test cardano-wasm/js-test/basic-test.spec.ts

# - name: Run tests
# env:
# TMPDIR: ${{ runner.temp }}
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@
playwright = playwright-pkgs.mkShell {
packages = [
playwright-pkgs.playwright-test
playwright-pkgs.python313Packages.docopt
playwright-pkgs.python313Packages.httpserver
];
};
};
Expand Down
Loading