chore: update CHANGELOG release date to 2026-05-22 [skip-runtime-e2e]… #559
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: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| env: | |
| AXONFLOW_TELEMETRY: 'off' | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| # PR runs only Go 1.22 (current release toolchain). Push to main and | |
| # workflow_dispatch run the full matrix to catch version-specific drift. | |
| matrix: | |
| go-version: ${{ fromJson(github.event_name == 'pull_request' && '["1.22"]' || '["1.21", "1.22", "1.23"]') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # setup-go@v5 caches the module + build cache by default when go.sum | |
| # exists at the repo root — no manual `actions/cache@v4` step needed. | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run go fmt | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "The following files are not formatted:" | |
| gofmt -s -l . | |
| exit 1 | |
| fi | |
| - name: Run tests | |
| run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | |
| - name: Check coverage threshold | |
| run: | | |
| # Generate coverage for main SDK packages only (exclude examples) | |
| go test -coverprofile=coverage-sdk.txt -covermode=atomic . ./interceptors | |
| # Extract coverage percentages | |
| COVERAGE=$(go tool cover -func=coverage-sdk.txt | grep 'total:' | awk '{print $3}' | sed 's/%//') | |
| echo "Total coverage: ${COVERAGE}%" | |
| # Check threshold (75% minimum) | |
| THRESHOLD=75 | |
| if (( $(echo "$COVERAGE < $THRESHOLD" | bc -l) )); then | |
| echo "Coverage ${COVERAGE}% is below threshold ${THRESHOLD}%" | |
| exit 1 | |
| fi | |
| echo "Coverage ${COVERAGE}% meets threshold ${THRESHOLD}%" | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| file: ./coverage.txt | |
| flags: unittests | |
| name: codecov-umbrella | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # Aggregator that always reports a single check name regardless of the | |
| # matrix shape (PR-time matrix is `['1.22']`; push/dispatch is full). | |
| # Branch protection requires `Test Summary`, not the per-version names, | |
| # so matrix changes don't strand required checks. | |
| test-summary: | |
| name: Test Summary | |
| needs: [test] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Aggregate test matrix result | |
| run: | | |
| result="${{ needs.test.result }}" | |
| echo "test matrix result: $result" | |
| if [ "$result" != "success" ] && [ "$result" != "skipped" ]; then | |
| echo "::error::test matrix did not all pass (result: $result)" | |
| exit 1 | |
| fi | |
| echo "Test matrix OK" | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Build examples | |
| run: | | |
| go build -v ./examples/basic | |
| go build -v ./examples/connectors | |
| go build -v ./examples/planning |