name: Shell tests on: push: branches: [main] pull_request: branches: [main] jobs: shell-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Install bats run: sudo apt-get update && sudo apt-get install -y bats - name: Run bats suites run: bats linux_configuration/tests/*.bats # Only the side-effect-free tests run here. The rest of # linux_configuration/tests/ drives pacman, /etc, systemd or adb and # cannot run on an Ubuntu runner without root and an Arch container -- # see the accompanying evidence artifacts for the full list. - name: Run side-effect-free shell tests run: | set -euo pipefail tests=( test_android_guardian_post_fs_data.sh test_android_guardian_service.sh test_i3blocks_persist_common.sh test_music_parallelism.sh test_setup_dns_blocker.sh test_usage_monitoring_installer_efficiency.sh ) failed=0 for t in "${tests[@]}"; do printf '\n=== %s ===\n' "$t" if bash "linux_configuration/tests/$t"; then printf 'PASS %s\n' "$t" else printf 'FAIL %s\n' "$t" failed=$((failed + 1)) fi done if [ "$failed" -gt 0 ]; then printf '\n%d shell test(s) failed\n' "$failed" exit 1 fi