fix: execute tests with code from the branch
This commit is contained in:
parent
ebbdcb187f
commit
e5b23dad6b
3 changed files with 23 additions and 8 deletions
2
.github/workflows/dev-push-check.yml
vendored
2
.github/workflows/dev-push-check.yml
vendored
|
@ -30,5 +30,5 @@ jobs:
|
||||||
run: sudo apt install -y tmux git
|
run: sudo apt install -y tmux git
|
||||||
- name: checkout repo
|
- name: checkout repo
|
||||||
uses: actions/checkout@main
|
uses: actions/checkout@main
|
||||||
- name: dummy test setup
|
- name: run all linux tests
|
||||||
run: ./tests/run_all_linux_tests.sh
|
run: ./tests/run_all_linux_tests.sh
|
||||||
|
|
|
@ -26,6 +26,11 @@ EOF
|
||||||
|
|
||||||
cat ~/.tmux.conf
|
cat ~/.tmux.conf
|
||||||
|
|
||||||
|
echo "Current DIR: $CURRENT_DIR"
|
||||||
|
|
||||||
|
# link current repo to plugin list
|
||||||
|
ln -sf ~/.tmux/plugins/tmux-gruvbox/ "$CURRENT_DIR/../"
|
||||||
|
|
||||||
helper_install_tpm_plugins
|
helper_install_tpm_plugins
|
||||||
|
|
||||||
# start new detached session
|
# start new detached session
|
||||||
|
@ -34,10 +39,12 @@ EOF
|
||||||
# get status of something from theme
|
# get status of something from theme
|
||||||
_status_left_current=$(tmux show-option -gqv status-left)
|
_status_left_current=$(tmux show-option -gqv status-left)
|
||||||
if [[ "$STATUS_LEFT_DEFAULT" != "$_status_left_current" ]]; then
|
if [[ "$STATUS_LEFT_DEFAULT" != "$_status_left_current" ]]; then
|
||||||
helper_print_fail_and_exit "Status left did not match"
|
helper_print_fail "status-left did not match"
|
||||||
|
else
|
||||||
|
helper_print_success "status-left match"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
helper_print_success_and_exit "Status left match"
|
helper_teardown
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
helper_teardown_tmux() {
|
helper_teardown() {
|
||||||
rm -rf ~/.tmux.conf
|
rm -rf ~/.tmux.conf
|
||||||
rm -rf ~/.tmux/
|
rm -rf ~/.tmux/
|
||||||
tmux kill-server >/dev/null 2>&1
|
tmux kill-server >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
helper_tearup_linux_tmux() {
|
helper_tearup_linux() {
|
||||||
if [[ "$(uname)" != "Linux" ]]; then
|
if [[ "$(uname)" != "Linux" ]]; then
|
||||||
echo "NOT LINUX. Failed & exit."
|
echo "NOT LINUX. Failed & exit."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -21,15 +21,23 @@ helper_tearup_linux_tmux() {
|
||||||
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
|
||||||
}
|
}
|
||||||
|
|
||||||
helper_print_fail_and_exit() {
|
helper_print_fail() {
|
||||||
local _msg="${1:-}"
|
local _msg="${1:-}"
|
||||||
printf "FAIL. %s\n" "${_msg}"
|
printf "FAIL. %s\n" "${_msg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
helper_print_success() {
|
||||||
|
local _msg="${1:-}"
|
||||||
|
printf "SUCCESS. %s\n" "${_msg}"
|
||||||
|
}
|
||||||
|
|
||||||
|
helper_print_fail_and_exit() {
|
||||||
|
helper_print_fail "$1"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
helper_print_success_and_exit() {
|
helper_print_success_and_exit() {
|
||||||
local _msg="${1:-}"
|
helper_print_success "$1"
|
||||||
printf "SUCCESS. %s\n" "${_msg}"
|
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue