Skip to content

Commit

Permalink
Remove cli install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentluce committed Oct 21, 2024
1 parent 23fbce4 commit 50433a2
Showing 1 changed file with 0 additions and 62 deletions.
62 changes: 0 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,65 +140,3 @@ jobs:
ln -s $path $binout
ls -lah $binout
[ -s $binout ]
test_cli_install:
strategy:
matrix:
shell: [bash, fish, zsh]
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v3

- name: Install ShellCheck and shells
run: |
sudo apt-get update
sudo apt-get install -y shellcheck fish zsh
- name: Run ShellCheck
run: shellcheck ./scripts/install_cli.sh

- name: Run install script with ${{ matrix.shell }}
run: |
if [ "${{ matrix.shell }}" = "fish" ]; then
fish -c 'set -gx SHELL (which fish); cat ./scripts/install_cli.sh | bash'
elif [ "${{ matrix.shell }}" = "zsh" ]; then
zsh -c 'export SHELL=$(which zsh); cat ./scripts/install_cli.sh | bash'
elif [ "${{ matrix.shell }}" = "bash" ]; then
bash -c 'export SHELL=$(which bash); cat ./scripts/install_cli.sh | bash'
else
echo "Unsupported shell: ${{ matrix.shell }}"
exit 1
fi
- name: Check if ~/.local/bin exists
run: |
if [ ! -d ~/.local/bin ]; then
echo "~/.local/bin directory was not created"
exit 1
fi
- name: Check if config was added
run: |
if [ "${{ matrix.shell }}" = "fish" ]; then
config_file="$HOME/.config/fish/config.fish"
elif [ "${{ matrix.shell }}" = "zsh" ]; then
config_file="$HOME/.zshrc"
else
config_file="$HOME/.bashrc"
fi
if ! grep -q "# Kardinal CLI config" "$config_file"; then
echo "CLI tool configuration was not added to $config_file"
cat "$config_file"
exit 1
fi
- name: Verify kardinal command
run: |
if [ "${{ matrix.shell }}" = "fish" ]; then
fish -c 'source ~/.config/fish/config.fish; if kardinal | grep -q "Kardinal CLI"; exit 0; else; exit 1; end'
elif [ "${{ matrix.shell }}" = "zsh" ]; then
zsh -c 'source ~/.zshrc; if kardinal | grep -q "Kardinal CLI"; then exit 0; else exit 1; fi'
else
bash -c 'source ~/.bashrc; if kardinal | grep -q "Kardinal CLI"; then exit 0; else exit 1; fi'
fi

0 comments on commit 50433a2

Please sign in to comment.