Skip to content

Commit

Permalink
chore: add shellspec ci
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook committed Sep 4, 2024
1 parent 6044d61 commit 845e202
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/shellspec-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,11 @@ jobs:
if: ${{ steps.get_file_path.outputs.shell_file_path }}
run: |
make scripts-test
- name: Upload coverage
if: ${{ steps.get_file_path.outputs.shell_file_path }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bash <(curl -s https://codecov.io/bash) -s coverage
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,9 @@ endif
# run shellspec tests
.PHONY: scripts-test
scripts-test: install-shellspec ## Run shellspec unit test cases.
@shellspec --load-path $(SHELLSPEC_LOAD_PATH) --default-path $(SHELLSPEC_DEFAULT_PATH) --shell $(SHELLSPEC_DEFAULT_SHELL)
@shellspec --load-path $(SHELLSPEC_LOAD_PATH) --default-path $(SHELLSPEC_DEFAULT_PATH) --shell $(SHELLSPEC_DEFAULT_SHELL)

# run shellspec tests with coverage report
.PHONY: scripts-test-kcov
scripts-test-kcov: install-shellspec ## Run shellspec unit test cases.
@shellspec --load-path $(SHELLSPEC_LOAD_PATH) --default-path $(SHELLSPEC_DEFAULT_PATH) --shell $(SHELLSPEC_DEFAULT_SHELL) --kcov
1 change: 1 addition & 0 deletions addons/postgresql/scripts-ut-spec/pgbouncer_setup_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if ! validate_shell_type_and_version "bash" 4 &>/dev/null; then
exit 0
fi


source ./utils.sh

# The unit test needs to rely on the common library functions defined in kblib.
Expand Down

0 comments on commit 845e202

Please sign in to comment.