name: CI on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: jobs: ci: strategy: fail-fast: false matrix: include: - runner: ubuntu-latest os: linux arch: amd64 - runner: macos-latest os: darwin arch: arm64 runs-on: ${{ matrix.runner }} steps: - uses: actions/checkout@v6 - uses: actions/setup-go@v6 with: go-version-file: go.mod - name: Cache dependencies (model + ORT) uses: actions/cache@v5 with: path: internal/embed/bundle key: sense-deps-${{ matrix.os }}-${{ matrix.arch }}-${{ hashFiles('scripts/fetch-deps.sh') }} - name: Fetch dependencies (model + ORT) run: ./scripts/fetch-deps.sh --local - name: Build run: make build - name: Test run: go test -v ./... - name: Smoke run: make smoke - name: Lint uses: golangci/golangci-lint-action@v9 with: version: latest stdout-hygiene: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: No bare fmt.Print in internal/ (except MCP transport) run: | # Grep for fmt.Print / fmt.Println / fmt.Printf (not fmt.Fprint*) # in internal/ excluding the MCP transport package and test files. # These would corrupt the stdio JSON-RPC channel when running as # an MCP server. Use fmt.Fprint(writer, ...) instead. hits=$(grep -rn 'fmt\.Print\b\|fmt\.Println\b\|fmt\.Printf\b' \ internal/ \ --include='*.go' \ --exclude-dir='mcpserver' \ | grep -v '_test\.go' \ | grep -v 'fmt\.Fprint' || true) if [ -n "$hits" ]; then echo "ERROR: bare fmt.Print* found (use fmt.Fprint* with an io.Writer):" echo "$hits" exit 1 fi