diff --git a/.github/workflows/bashtest.sh b/.github/workflows/bashtest.sh index bf0d8e3..3a5b748 100755 --- a/.github/workflows/bashtest.sh +++ b/.github/workflows/bashtest.sh @@ -1,26 +1,17 @@ #! /usr/bin/env bash -function runme() { +function bashtest() { # set -x # verbose-mode - local git_root="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" - for i in {1..3}; do - git_root=$(dirname $git_root) - done - echo "git_root: $git_root" + local plugin_name=$1 - pushd $git_root >/dev/null + cd .. git clone https://github.com/kamangir/awesome-bash-cli.git - cd awesome-bash-cli - pip3 install -e . - pip3 install -r requirements.txt - popd >/dev/null - source $git_root/awesome-bash-cli/bash/abcli.sh ~terraform - - hubble test "$@" + source $(pwd)/awesome-bash-cli/bash/abcli.sh ~terraform \ + $plugin_name test return } -runme "$@" +bashtest "$@" diff --git a/.github/workflows/bashtest.yml b/.github/workflows/bashtest.yml index 0f5fe1b..8c3451c 100644 --- a/.github/workflows/bashtest.yml +++ b/.github/workflows/bashtest.yml @@ -3,7 +3,7 @@ name: bashtest on: [push] jobs: - build: + bashtest: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -15,7 +15,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -e . - pip install pytest pip install -r requirements.txt - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1 @@ -34,4 +33,5 @@ jobs: echo "AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY" echo "ABCLI_AWS_RDS_HOST: $ABCLI_AWS_RDS_HOST" echo "ABCLI_AWS_RDS_PASSWORD: $ABCLI_AWS_RDS_PASSWORD" - ./.github/workflows/bashtest.sh + + ./.github/workflows/bashtest.sh hubble \ No newline at end of file diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 88cf5f9..75c0cee 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -18,7 +18,6 @@ jobs: run: | python -m pip install --upgrade pip pip install -e . - pip install pytest pip install -r requirements.txt - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v1