automerge/scripts/ci/js_tests
alexjg 5629a7bec4
Various CI script fixes (#501)
Some of the scripts in scripts/ci were not reliable detecting the path
they were operating in. Additionally the deno_tests script was not
correctly picking up the ROOT_MODULE environment variable. Add more
robust path handling and fix the deno_tests script.
2023-01-19 15:38:27 +00:00

15 lines
625 B
Bash
Executable file

#!/usr/bin/env bash
set -eoux pipefail
# see https://stackoverflow.com/questions/4774054/reliable-way-for-a-bash-script-to-get-the-full-path-to-itself
THIS_SCRIPT="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
WASM_PROJECT=$THIS_SCRIPT/../../rust/automerge-wasm;
JS_PROJECT=$THIS_SCRIPT/../../javascript;
E2E_PROJECT=$THIS_SCRIPT/../../javascript/e2e;
yarn --cwd $E2E_PROJECT install;
# This will build the automerge-wasm project, publish it to a local NPM
# repository, then run `yarn build` in the `javascript` directory with
# the local registry
yarn --cwd $E2E_PROJECT e2e buildjs;
yarn --cwd $JS_PROJECT test