chore: refactor WebAssembly test commands in Taskfile to use ROOT_DIR variable for improved path management
Some checks failed
Bearer / scan (push) Successful in 53s
Go Build Multi-Platform / build (amd64, freebsd) (push) Successful in 48s
Go Build Multi-Platform / build (amd64, darwin) (push) Successful in 51s
Go Build Multi-Platform / build (amd64, linux) (push) Successful in 51s
Go Build Multi-Platform / build (amd64, windows) (push) Successful in 49s
Go Build Multi-Platform / build (arm, linux) (push) Successful in 46s
Go Build Multi-Platform / build (arm, freebsd) (push) Successful in 48s
Go Build Multi-Platform / build (arm64, darwin) (push) Successful in 50s
Go Build Multi-Platform / build (arm64, freebsd) (push) Successful in 48s
Go Build Multi-Platform / build (arm, windows) (push) Successful in 52s
Go Build Multi-Platform / build (arm64, linux) (push) Successful in 46s
Go Build Multi-Platform / build (wasm, js) (push) Successful in 1m13s
Go Build Multi-Platform / build (arm64, windows) (push) Successful in 1m15s
TinyGo Build / tinygo-build (tinygo-build, tinygo-default, reticulum-go-tinygo, ) (pull_request) Failing after 1m11s
TinyGo Build / tinygo-build (tinygo-wasm, tinygo-wasm, reticulum-go.wasm, wasm) (pull_request) Failing after 1m9s
Go Revive Lint / lint (push) Successful in 1m5s
Go Test Multi-Platform / Test (ubuntu-latest, arm64) (push) Successful in 1m25s
Go Build Multi-Platform / Create Release (push) Has been skipped
Run Gosec / tests (push) Successful in 1m39s
Go Test Multi-Platform / Test (ubuntu-latest, amd64) (push) Successful in 2m45s

This commit is contained in:
2025-12-31 11:57:21 -06:00
parent b74012099c
commit e5ac206e5c

View File

@@ -254,14 +254,17 @@ tasks:
test-wasm:
desc: Run WebAssembly tests using Node.js
vars:
WASM_BIN_PATH:
ROOT_DIR:
sh: pwd
env:
GOOS: js
GOARCH: wasm
cmds:
- PATH="$PATH:{{.WASM_BIN_PATH}}/misc/wasm" {{.GOCMD}} test -v ./pkg/wasm/ ./cmd/reticulum-wasm/
- PATH="$PATH:{{.WASM_BIN_PATH}}/misc/wasm" cd examples/wasm && {{.GOCMD}} test -v .
- chmod +x {{.ROOT_DIR}}/misc/wasm/go_js_wasm_exec
- PATH="$PATH:{{.ROOT_DIR}}/misc/wasm" {{.GOCMD}} test -v ./pkg/wasm/ ./cmd/reticulum-wasm/
- |
export PATH="$PATH:{{.ROOT_DIR}}/misc/wasm"
cd examples/wasm && {{.GOCMD}} test -v .
build-wasm:
desc: Build WebAssembly binary with standard Go compiler