From 307507c9473f67554d30b12f888d3d02d723be6b Mon Sep 17 00:00:00 2001 From: Maciej Sypien Date: Thu, 19 Sep 2024 14:43:40 +0200 Subject: [PATCH] feat: add dummy test for linux --- .github/workflows/github-actions.yml | 9 +++++++ tests/linux_setup_plugin_and_run.sh | 39 ++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 tests/linux_setup_plugin_and_run.sh diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 6f76a98..5455322 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -20,3 +20,12 @@ jobs: uses: actions/checkout@main - name: lint files against shfmt run: make lint_shfmt + test-setup-linux: + runs-on: ubuntu-latest + steps: + - name: install soft + run: sudo apt install -y tmux git + - name: checkout repo + uses: actions/checkout@main + - name: test setup + run: ./tests/linux_setup_plugin_and_run.sh diff --git a/tests/linux_setup_plugin_and_run.sh b/tests/linux_setup_plugin_and_run.sh new file mode 100755 index 0000000..da3493c --- /dev/null +++ b/tests/linux_setup_plugin_and_run.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# this test is meant to run on linux +# +# test target is: +# - ubuntu 20.04 LTS +# - bash + +main() { + if [[ "$(uname)" != "Linux" ]]; then + echo "NOT LINUX. Failed & exit." + exit 1 + fi + + sudo apt update -y + sudo apt install -y tmux git + + mkdir -p ~/.tmux/plugins/ + git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + + cat <~/.tmux.conf +# List of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' + +# Other plugins +set -g @plugin 'egel/tmux-gruvbox' +set -g @tmux-gruvbox 'dark' + +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) +run '~/.tmux/plugins/tpm/tpm' +EOF + + cat ~/.tmux.conf + + tmux source ~/.tmux.conf +} + +main "$@"