-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (59 loc) · 1.94 KB
/
test.yaml
File metadata and controls
68 lines (59 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Shell Installation Test
on:
push:
branches: [main]
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
test-shells:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
shell: ["zsh", "fish", "bash"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install Zsh and Fish on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y zsh fish
- name: Install Zsh and Fish on MacOS
if: matrix.os == 'macos-latest'
run: |
brew install zsh fish
- name: Setup shell environment
run: |
mkdir -p ~/.config/fish
mkdir -p ~/.zsh
touch ~/.bashrc
- name: Test install script in Zsh
if: matrix.shell == 'zsh'
run: |
bash ./install.bash
shell: zsh {0}
- name: Test install script in Fish
if: matrix.shell == 'fish'
run: |
bash ./install.bash
shell: fish {0}
- name: Verify installation
run: |
if [ "${{ matrix.shell }}" = "zsh" ]; then
zsh -c "source ~/.zshrc && echo 'Zsh configuration loaded'"
elif [ "${{ matrix.shell }}" = "fish" ]; then
fish -c "source ~/.config/fish/config.fish && echo 'Fish configuration loaded'"
elif [ "${{ matrix.shell }}" = "bash" ]; then
bash -c "source ~/.bashrc && echo 'Bash configuration loaded'"
fi
[ -f ~/.shelltime/hooks/bash-preexec.sh ] || (echo "bash-preexec.sh not found in ~/.shelltime/hooks!" && exit 1)
ls ~/.shelltime
if command -v brew >/dev/null 2>&1 && brew list shelltime >/dev/null 2>&1; then
which shelltime || (echo "shelltime not in PATH via Homebrew!" && exit 1)
else
ls ~/.shelltime/bin
fi
ls ~/.shelltime/hooks