Skip to content

Commit

Permalink
fix: use kli file in tests to link with dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Jun 20, 2024
1 parent 616b35b commit 5db4770
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Setup workspace
env:
KALISIO_GITHUB_URL: ${{ secrets.KALISIO_GITHUB_URL }}
run: bash ./scripts/setup_workspace.sh
run: bash ./scripts/setup_workspace.sh -n ${{ matrix.node }}
- name: Run tests
env:
SOPS_AGE_KEY: ${{ secrets.SOPS_AGE_KEY }}
Expand Down
25 changes: 19 additions & 6 deletions scripts/setup_workspace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
# set -x
#set -x

THIS_FILE=$(readlink -f "${BASH_SOURCE[0]}")
THIS_DIR=$(dirname "$THIS_FILE")
Expand All @@ -12,6 +12,18 @@ WORKSPACE_DIR="$(dirname "$ROOT_DIR")"
## Parse options
##

WORKSPACE_NODE=16
OPT_LIST="n:"

while getopts "$OPT_LIST" OPT; do
case $OPT in
n) # defines node version
WORKSPACE_NODE=$OPTARG;;
*)
;;
esac
done

begin_group "Setting up workspace ..."

if [ "$CI" != true ]; then
Expand All @@ -31,12 +43,13 @@ if [ "$CI" != true ]; then

# Clone project in the workspace
git_shallow_clone "$KALISIO_GITHUB_URL/kalisio/kdk.git" "$WORKSPACE_DIR/kdk" "${WORKSPACE_TAG:-${WORKSPACE_BRANCH:-}}"

# unset KALISIO_DEVELOPMENT_DIR because we want kli to clone everyhting in $WORKSPACE_DIR
unset KALISIO_DEVELOPMENT_DIR
fi

setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git" \
"https://github.com/kalisio/feathers-distributed.git" \
"https://github.com/kalisio/feathers-webpush.git" \
"https://github.com/kalisio/feathers-s3.git" \
"https://github.com/kalisio/feathers-import-export.git"
setup_lib_workspace "$WORKSPACE_DIR" "$KALISIO_GITHUB_URL/kalisio/development.git"

run_kli "$WORKSPACE_DIR" "$WORKSPACE_NODE" "$WORKSPACE_DIR/development/workspaces/libs/kdk/dev/kdk.cjs" klifull

end_group "Setting up workspace ..."

0 comments on commit 5db4770

Please sign in to comment.