diff --git a/.github/workflows/bats-test.yml b/.github/workflows/bats-test.yml index 49e26b6e6b..222399ff7e 100644 --- a/.github/workflows/bats-test.yml +++ b/.github/workflows/bats-test.yml @@ -15,25 +15,19 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install jq - run: | - sudo apt-get update - sudo apt-get install -y jq - - name: Prepare matrix for test files id: set-matrix run: | BATS_FILES=$(find docker-compose/setup-script/tests -name '*.bats') - MATRIX_JSON=$(echo $BATS_FILES | jq -Rsc 'split("\n") | map(select(. != ""))') - echo "matrix=$MATRIX_JSON" >> $GITHUB_ENV - + MATRIX_JSON=$(echo $BATS_FILES | tr -d '\n' | jq -Rsc 'split(" ")' | tr '"' "'") + echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT test: needs: prepare runs-on: ubuntu-latest strategy: fail-fast: false matrix: - test: ${{fromJson(env.matrix)}} + test: ${{fromJson(needs.prepare.outputs.matrix)}} steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/docker-compose/setup-script/noco.sh b/docker-compose/setup-script/noco.sh index 2c5c809d10..8f4855d6f3 100755 --- a/docker-compose/setup-script/noco.sh +++ b/docker-compose/setup-script/noco.sh @@ -14,7 +14,7 @@ ORANGE='\033[0;33m' BOLD='\033[1m' NC='\033[0m' -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" # ***************** GLOBAL VARIABLES END *********************************** # ****************************************************************************** diff --git a/docker-compose/setup-script/tests/configure/monitor.bats b/docker-compose/setup-script/tests/configure/monitor.bats index ae20a2d85f..b2e5ee739e 100755 --- a/docker-compose/setup-script/tests/configure/monitor.bats +++ b/docker-compose/setup-script/tests/configure/monitor.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/configure/restart.bats b/docker-compose/setup-script/tests/configure/restart.bats index 2f92868882..8e3082c67e 100755 --- a/docker-compose/setup-script/tests/configure/restart.bats +++ b/docker-compose/setup-script/tests/configure/restart.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/configure/scale.bats b/docker-compose/setup-script/tests/configure/scale.bats index b2bbadd45d..d3adb5e638 100755 --- a/docker-compose/setup-script/tests/configure/scale.bats +++ b/docker-compose/setup-script/tests/configure/scale.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/configure/setup.sh b/docker-compose/setup-script/tests/configure/setup.sh index 3eee2485b5..6c575428bd 100755 --- a/docker-compose/setup-script/tests/configure/setup.sh +++ b/docker-compose/setup-script/tests/configure/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$NOCO_HOME" ]; then - NOCO_HOME="${HOME}/.nocodb" + NOCO_HOME="./nocodb" fi if [ -d "$NOCO_HOME" ]; then diff --git a/docker-compose/setup-script/tests/configure/start.bats b/docker-compose/setup-script/tests/configure/start.bats index b438e516eb..0a1dce9414 100755 --- a/docker-compose/setup-script/tests/configure/start.bats +++ b/docker-compose/setup-script/tests/configure/start.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/configure/stop.bats b/docker-compose/setup-script/tests/configure/stop.bats index 47f202dfa4..9879a22090 100755 --- a/docker-compose/setup-script/tests/configure/stop.bats +++ b/docker-compose/setup-script/tests/configure/stop.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/configure/upgrade.bats b/docker-compose/setup-script/tests/configure/upgrade.bats index b0e9f6275a..4092a9c148 100755 --- a/docker-compose/setup-script/tests/configure/upgrade.bats +++ b/docker-compose/setup-script/tests/configure/upgrade.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/install/default.bats b/docker-compose/setup-script/tests/install/default.bats index ef6e758d23..a50b6d1825 100755 --- a/docker-compose/setup-script/tests/install/default.bats +++ b/docker-compose/setup-script/tests/install/default.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/install/ip.bats b/docker-compose/setup-script/tests/install/ip.bats index e3fbc1b547..b99d72f802 100755 --- a/docker-compose/setup-script/tests/install/ip.bats +++ b/docker-compose/setup-script/tests/install/ip.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/install/redis.bats b/docker-compose/setup-script/tests/install/redis.bats index fba5db9add..f604df64db 100755 --- a/docker-compose/setup-script/tests/install/redis.bats +++ b/docker-compose/setup-script/tests/install/redis.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/install/scale.bats b/docker-compose/setup-script/tests/install/scale.bats index 73d3e325e5..b98b7b7ed8 100755 --- a/docker-compose/setup-script/tests/install/scale.bats +++ b/docker-compose/setup-script/tests/install/scale.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME diff --git a/docker-compose/setup-script/tests/install/setup.sh b/docker-compose/setup-script/tests/install/setup.sh index 2397e20809..56165d5034 100755 --- a/docker-compose/setup-script/tests/install/setup.sh +++ b/docker-compose/setup-script/tests/install/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ -z "$NOCO_HOME" ]; then - NOCO_HOME="${HOME}/.nocodb" + NOCO_HOME="./nocodb" fi if [ -d "$NOCO_HOME" ]; then diff --git a/docker-compose/setup-script/tests/install/watchtower.bats b/docker-compose/setup-script/tests/install/watchtower.bats index 32c988809c..67f5dfddd6 100755 --- a/docker-compose/setup-script/tests/install/watchtower.bats +++ b/docker-compose/setup-script/tests/install/watchtower.bats @@ -1,6 +1,6 @@ #!/usr/bin/env bats -NOCO_HOME="${HOME}/.nocodb" +NOCO_HOME="./nocodb" export NOCO_HOME setup() {