feat: add unit tests and documentation #3
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 Shell Scripts | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/actions/**/*.sh' | |
| - 'tests/**' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - '.github/actions/**/*.sh' | |
| - 'tests/**' | |
| jobs: | |
| unit-tests: | |
| name: bats unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install bats | |
| run: sudo npm install -g bats | |
| - name: Verify bats version | |
| run: bats --version | |
| - name: Run unit tests | |
| run: bats --verbose-run tests/unit/ | |
| - name: Summarise results | |
| if: always() | |
| run: echo "Shell script unit tests complete." |