fix(ci): resolve all ShellCheck warnings and errors #4
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| shellcheck: | |
| name: ShellCheck Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install ShellCheck | |
| run: sudo apt-get update -q && sudo apt-get install -y shellcheck | |
| - name: Lint all scripts | |
| run: | | |
| echo "Running ShellCheck on all scripts..." | |
| find scripts/ -name "*.sh" -type f | sort | xargs shellcheck --severity=warning | |
| test: | |
| name: BATS Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y bats curl jq openssl | |
| - name: Run full test suite | |
| run: bats tests/*.bats | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: test-results/ | |
| if-no-files-found: ignore |