diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d5a239..ecee01c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,38 +28,8 @@ jobs: shell: /bin/zsh -ileo PIPE_FAIL {0} run: | echo $SHELL - antigen list + antigen list - - name: check files + - name: run tests shell: /bin/zsh -ileo PIPE_FAIL {0} - run: | - l ~ - l ~/.ssh - cat ~/.zshrc - - - name: check scripts and alias - shell: /bin/zsh -ileo PIPE_FAIL {0} - run: | - cd / - dfs - dfs cd - pwd - dfs version - dfs log 1 - l - dogo - tools/common.sh get_os_type - tools/common.sh get_linux_dist - bash -x tools/common.sh post_log 1 2 3 - - - name: check scripts and alias (no ret check) - shell: /bin/zsh -il {0} - run: | - p114 -c 4 - return 0 - - - name: check update - shell: /bin/zsh -ileo PIPE_FAIL {0} - run: | - dfs update - dfs version \ No newline at end of file + run: source tools/test.zsh \ No newline at end of file diff --git a/tools/test.zsh b/tools/test.zsh index 6de6e2f..3abfda2 100644 --- a/tools/test.zsh +++ b/tools/test.zsh @@ -1,24 +1,28 @@ +#!/bin/false "This script should be sourced in a shell, not executed directly" set -ex -l ~ -l ~/.ssh -cat ~/.zshrc +# check files cd / -dfs dfs cd pwd +test -f .zshrc2 +diff -q ./.ssh/authorized_keys2 ~/.ssh/authorized_keys2 +grep -q ".zshrc2" ~/.zshrc + +# check scripts and functions dfs version dfs log 1 l dogo tools/common.sh get_os_type tools/common.sh get_linux_dist -bash -x tools/common.sh post_log 1 2 3 +# check alias +alias p114 > /dev/null + +# check update dfs update dfs version -# ..? -p114 -c 4