Fix macOS crash: /etc/os-release doesn't exist on Darwin #2
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: | |
| jobs: | |
| lint: | |
| name: ShellCheck (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: ShellCheck | |
| run: | | |
| sudo apt-get update -qq && sudo apt-get install -y shellcheck | |
| # Forked Mole UI components keep upstream style; check at error severity. | |
| shellcheck -S error vole install.sh bin/*.sh lib/core/*.sh lib/ui/*.sh | |
| syntax-linux: | |
| name: Bash syntax + smoke (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Syntax check | |
| run: | | |
| for f in vole install.sh bin/*.sh lib/core/*.sh lib/ui/*.sh; do | |
| bash -n "$f" | |
| done | |
| - name: Smoke test | |
| run: | | |
| chmod +x vole bin/*.sh | |
| ./vole version | |
| ./vole help | |
| ./vole clean --dry-run < /dev/null | |
| ./vole status | |
| syntax-macos: | |
| name: Bash 3.2 syntax + smoke (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Syntax check with system bash 3.2 | |
| run: | | |
| for f in vole install.sh bin/*.sh lib/core/*.sh lib/ui/*.sh; do | |
| /bin/bash -n "$f" | |
| done | |
| - name: Smoke test with system bash 3.2 | |
| run: | | |
| chmod +x vole bin/*.sh | |
| /bin/bash ./vole version | |
| /bin/bash ./vole help | |
| /bin/bash ./vole clean --dry-run < /dev/null | |
| /bin/bash ./vole status |