docs: CTX-006 testing-layers memo + TP-046 eval-suite follow-up task #33
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, dev] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: test (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache: true | |
| - run: go vet ./... | |
| - run: go test -race ./... | |
| build: | |
| name: build (${{ matrix.goos }}/${{ matrix.goarch }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { goos: darwin, goarch: amd64 } | |
| - { goos: darwin, goarch: arm64 } | |
| - { goos: linux, goarch: amd64 } | |
| - { goos: linux, goarch: arm64 } | |
| - { goos: windows, goarch: amd64 } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache: true | |
| - name: build | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: 0 | |
| run: | | |
| mkdir -p bin | |
| go build -ldflags "-s -w" -o bin/docops ./cmd/docops | |
| - name: enforce 30MB binary size target (ADR-0012) | |
| shell: bash | |
| run: | | |
| size=$(wc -c < bin/docops* | tr -d ' ') | |
| limit=$((30 * 1024 * 1024)) | |
| echo "binary: $size bytes (limit $limit)" | |
| if [ "$size" -gt "$limit" ]; then | |
| echo "::error::binary exceeds 30MB target" | |
| exit 1 | |
| fi | |
| # Dogfood gate: this repo's own docs/ must pass the tool it ships. | |
| # No STATE.md/.index.json diff check here — both embed the current date | |
| # (age_days, staleness), so a byte-for-byte comparison would fail on any | |
| # day other than the one the last commit was made. | |
| dogfood: | |
| name: dogfood (validate + refresh own docs) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: '1.25' | |
| cache: true | |
| - name: build docops | |
| run: | | |
| mkdir -p bin | |
| go build -o bin/docops ./cmd/docops | |
| - name: validate own docs | |
| run: ./bin/docops validate | |
| - name: refresh must succeed end-to-end | |
| run: ./bin/docops refresh | |
| - name: audit (informational) | |
| run: ./bin/docops audit || true |