Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ jobs:
- name: Lint - auth-protocol boundary (#1212 anti-regression)
run: bash scripts/lint-auth-signals.sh

# Linux-only for PR feedback. Full platform matrix (incl. macOS + Windows) runs post-merge in build-release.yml.
# Python test + binary build remain Linux-only for PR feedback. Full packaged
# platform coverage (incl. macOS + Windows) runs post-merge in build-release.yml.
# Combines unit tests + binary build into a single job to eliminate runner re-provisioning overhead.
build-and-test:
name: Build & Test (Linux)
Expand Down Expand Up @@ -128,6 +129,31 @@ jobs:
retention-days: 30
if-no-files-found: error

go-build-test:
name: Go Build & Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-latest]

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true

- name: Run Go tests
run: go test ./...

- name: Run Go build
run: go build ./...

# Dogfood the two CI gates we ship and document to users:
# - Gate A (consumer-side): `apm audit --ci` -- lockfile / install fidelity.
# - Gate B (producer-side): regeneration drift -- did someone hand-edit
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/reflink/reflink_other.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !linux && !darwin
//go:build !linux

package reflink

Expand Down
24 changes: 24 additions & 0 deletions tests/unit/test_ci_workflows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from pathlib import Path

import yaml

REPO_ROOT = Path(__file__).resolve().parents[2]


def _load_ci_workflow():
return yaml.safe_load((REPO_ROOT / ".github/workflows/ci.yml").read_text())


def test_go_build_test_matrix_includes_macos():
job = _load_ci_workflow()["jobs"]["go-build-test"]

assert job["runs-on"] == "${{ matrix.os }}"
assert job["strategy"]["matrix"]["os"] == ["ubuntu-24.04", "macos-latest"]


def test_go_build_test_runs_build_and_tests():
steps = _load_ci_workflow()["jobs"]["go-build-test"]["steps"]
commands = [step.get("run") for step in steps]

assert "go test ./..." in commands
assert "go build ./..." in commands