Skip to content

Commit

Permalink
workflow refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed Apr 26, 2024
1 parent e4f93f6 commit 51b9aff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 19 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/bashtest.sh
Original file line number Diff line number Diff line change
@@ -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 "$@"
6 changes: 3 additions & 3 deletions .github/workflows/bashtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bashtest
on: [push]

jobs:
build:
bashtest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -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
Expand All @@ -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
1 change: 0 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51b9aff

Please sign in to comment.