Skip to content

Test on VMs

Test on VMs #3

Workflow file for this run

name: Test on VMs
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
shell: [bash, zsh]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Make script executable
run: chmod +x ./cliwrap
- name: Test CLIwrap on ${{ matrix.os }} with ${{ matrix.shell }}
run: |
echo "Running on ${{ matrix.os }} with ${{ matrix.shell }}"
if [ "${{ matrix.shell }}" = "bash" ]; then
bash ./cliwrap -h
bash ./cliwrap -zsh
bash ./cliwrap -bash
bash ./cliwrap -fish
elif [ "${{ matrix.shell }}" = "zsh" ]; then
zsh ./cliwrap -h
zsh ./cliwrap -zsh
zsh ./cliwrap -bash
zsh ./cliwrap -fish
fi
# Simulate a history file for testing
echo -e "ls\ncd ..\ngit status" > test_history
export HOME=$(pwd)
cp test_history .zsh_history
cp test_history .bash_history
mkdir -p .local/share/fish
cp test_history .local/share/fish/fish_history
if [ "${{ matrix.shell }}" = "bash" ]; then
bash ./cliwrap
elif [ "${{ matrix.shell }}" = "zsh" ]; then
zsh ./cliwrap
fi
continue-on-error: true