Update explanation.txt #9
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
| # .github/workflows/ci.yml | |
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| shellcheck: | |
| name: ShellCheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 # :contentReference[oaicite:0]{index=0} | |
| - name: Run ShellCheck | |
| uses: ludeeus/[email protected] # :contentReference[oaicite:1]{index=1} | |
| bats: | |
| name: Bats (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 # :contentReference[oaicite:2]{index=2} | |
| - name: Setup Bats and bats libs | |
| id: setup-bats | |
| uses: bats-core/[email protected] # :contentReference[oaicite:3]{index=3} | |
| - name: Run Bats tests | |
| env: | |
| BATS_LIB_PATH: ${{ steps.setup-bats.outputs.lib-path }} | |
| TERM: xterm | |
| run: | | |
| set -euo pipefail | |
| if [[ -d "test" || -d "tests" ]]; then | |
| args=() | |
| [[ -d "test" ]] && args+=("test") | |
| [[ -d "tests" ]] && args+=("tests") | |
| bats -r "${args[@]}" | |
| else | |
| echo "No ./test or ./tests directory found (expected Bats tests there)." | |
| exit 1 | |
| fi |