Drop push-based downstream fan-out in favor of self-polling #820
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 # PILOT-113: least-privilege default | |
| jobs: | |
| go: | |
| name: Go (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Build | |
| # cmd/{registry,beacon,rendezvous,nameserver,gateway,updater,pilot-ca} | |
| # were extracted to sibling pilot-protocol/* repos; only daemon | |
| # and pilotctl ship from this repo now. | |
| run: | | |
| go build ./cmd/daemon | |
| go build ./cmd/pilotctl | |
| - name: Test (pkg + cmd + internal, -short) | |
| # PR CI runs pkg/cmd/internal unit tests with -short. The full | |
| # ./tests/ integration suite (daemons + network round-trips) | |
| # was structurally too heavy for the 15m public-runner budget | |
| # (sustained 15m timeouts even with per-test deadline bumps in | |
| # PR #120). Integration is now exclusively in nightly.yml. | |
| # -short skips 3 known-slow stress tests in pkg/daemon and | |
| # pkg/daemon/udpio; everything else runs. | |
| # | |
| # Both hosted runners have started handing out a $RUNNER_TEMP | |
| # (/Users/runner/work/_temp on macOS, /home/runner/work/_temp on | |
| # ubuntu) whose ACLs make t.TempDir() fail with "mkdir ...: | |
| # permission denied" — a recurring GitHub-runner issue (seen on | |
| # #304/#306/#308 for macOS and now hitting ubuntu too). A writable | |
| # subdir under it inherits the same restriction, so redirecting | |
| # TMPDIR *into* $RUNNER_TEMP is not enough; it must point at a | |
| # freshly-created dir outside that tree. Create one under /tmp | |
| # (writable by the test process on both Linux and macOS), chmod it | |
| # so t.TempDir()'s sub-dirs are creatable, and point $TMPDIR there | |
| # for THIS run block so go test's os.TempDir() -> t.TempDir() | |
| # lands somewhere writable. No job/step-level `env: TMPDIR:` is set | |
| # anywhere in this workflow, so nothing overrides this export. | |
| run: | | |
| TMPDIR="$(mktemp -d /tmp/gotmpXXXXXX 2>/dev/null || mktemp -d "${RUNNER_TEMP:-.}/gotmpXXXXXX")" | |
| chmod 777 "$TMPDIR" | |
| export TMPDIR | |
| echo "using TMPDIR=$TMPDIR" | |
| go test -short -count=1 -timeout 600s ./pkg/... ./cmd/... ./internal/... |