service: the daemon needs more than launchd's default descriptors (#78) #129
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 | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deterministic: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Library and model tests | |
| run: timeout 10m cargo test --locked --lib | |
| # The binary's own tests were never built here, so a test in src/main.rs | |
| # could stop COMPILING and this workflow stayed green. One had: the | |
| # `sync ls --json` schema test missed the `sweep` field added in #61. | |
| - name: Binary tests | |
| run: timeout 5m cargo test --locked --bins | |
| - name: Deterministic fake two-machine folder sync | |
| run: >- | |
| timeout 5m cargo test --locked --lib | |
| sync::engine::tests::two_engines_sync_real_folders_over_loopback | |
| -- --exact | |
| - name: Deterministic fake three-machine simultaneous sync | |
| run: >- | |
| timeout 5m cargo test --locked --lib | |
| sync::engine::tests::simultaneous_three_peer_syncs_do_not_deadlock | |
| -- --exact | |
| - name: Provisioning and CLI contract | |
| run: timeout 5m cargo test --locked --test provisioning -- --test-threads=1 | |
| - name: Real iroh folder sync and restart | |
| run: timeout 10m cargo test --locked --test sync_slice -- --test-threads=1 | |
| # The adversarial delete matrix. It was added on 2026-08-25 and NOT added | |
| # here, so the two tests that reproduce a file-loss incident ran only on | |
| # the author's laptop. That is the same shape as the `--bins` gap above. | |
| - name: Adversarial folder sync matrix | |
| run: timeout 10m cargo test --locked --test folder_sync -- --test-threads=1 | |
| - name: Serial local multi-node daemon slice | |
| run: timeout 15m cargo test --locked --test local_slice -- --test-threads=1 | |
| # A NEW FILE IN tests/ DOES NOT RUN HERE UNLESS SOMEBODY ADDS A STEP FOR | |
| # IT, and forgetting is silent: the suite goes green while the new tests | |
| # never execute. That has now happened twice, once for the binary's own | |
| # tests and once for the delete matrix. | |
| # | |
| # So every target must be either RUN above or named below with a reason. | |
| # Adding a test file and nothing else fails this step, which is the point. | |
| - name: Every test target is accounted for | |
| run: | | |
| set -euo pipefail | |
| # Named here, deliberately not run, with the reason. Shorten this list. | |
| not_yet_verified_on_linux="lifecycle pathwatch_slice shell" | |
| missing="" | |
| for path in tests/*.rs; do | |
| target="$(basename "$path" .rs)" | |
| if grep -q -- "--test $target" .github/workflows/test.yml; then | |
| continue | |
| fi | |
| case " $not_yet_verified_on_linux " in | |
| *" $target "*) | |
| echo "known gap, not run here: $target" | |
| continue | |
| ;; | |
| esac | |
| missing="$missing $target" | |
| done | |
| if [ -n "$missing" ]; then | |
| echo "these test targets never run in CI:$missing" >&2 | |
| echo "add a step for each, or name it in not_yet_verified_on_linux with a reason" >&2 | |
| exit 1 | |
| fi | |
| echo "every tests/*.rs target is run or explicitly accounted for" |