Skip to content

Commit

Permalink
feat: add dummy test for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
egel committed Sep 19, 2024
1 parent 6595a51 commit a0f7e7d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
36 changes: 36 additions & 0 deletions tests/linux_setup_plugin_and_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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 <<EOF >~/.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'
EOF

cat ~/.tmux.conf

tmux source ~/.tmux.conf
}

main "$@"

0 comments on commit a0f7e7d

Please sign in to comment.