Add help tests #633
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| os: [macos-latest, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/checkout@v6 | |
| with: | |
| repository: "aureliojargas/clitest" | |
| path: bin/clitest | |
| - name: Install latest Zsh | |
| run: sudo apt install zsh | |
| if: ${{ runner.os == 'Linux' }} | |
| - name: Install shellcheck on Linux | |
| if: ${{ runner.os == 'Linux' }} | |
| run: | | |
| if ! command -v shellcheck >/dev/null; then | |
| sudo apt-get update | |
| sudo apt-get install -y shellcheck | |
| fi | |
| - name: Install shellcheck on macOS | |
| if: ${{ runner.os == 'macOS' }} | |
| run: | | |
| if ! command -v shellcheck >/dev/null; then | |
| brew update | |
| brew install shellcheck | |
| fi | |
| - name: Run unit tests | |
| run: PATH=$GITHUB_WORKSPACE/bin/clitest:$PATH make test | |
| shell: zsh {0} |