From 0c6f63f34bc82c68f60ded0a3720faf6e01ac79c Mon Sep 17 00:00:00 2001 From: musti Date: Thu, 12 Dec 2024 17:40:48 +0300 Subject: [PATCH] fix ci/cd --- .github/workflows/test.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc99801..9c9b49f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,10 @@ -name: Test on devices +name: Test on VMs on: pull_request: branches: - main + workflow_dispatch: jobs: test: @@ -21,17 +22,30 @@ jobs: run: chmod +x ./cliwrap - name: Test CLIwrap on ${{ matrix.os }} with ${{ matrix.shell }} - shell: ${{ matrix.shell }} run: | - ./cliwrap -h - ./cliwrap -zsh - ./cliwrap -bash - ./cliwrap -fish + 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 - ./cliwrap + if [ "${{ matrix.shell }}" = "bash" ]; then + bash ./cliwrap + elif [ "${{ matrix.shell }}" = "zsh" ]; then + zsh ./cliwrap + fi