chore: prepare v0.14.0 release #35
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: Go Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'cmd/**' | |
| - 'internal/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/go-tests.yml' | |
| pull_request: | |
| paths: | |
| - 'cmd/**' | |
| - 'internal/**' | |
| - 'go.mod' | |
| - 'go.sum' | |
| - '.github/workflows/go-tests.yml' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| 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 with coverage | |
| run: go test -covermode=atomic -coverprofile=coverage.out ./... | |
| - name: Generate Go coverage reports | |
| run: | | |
| go tool cover -func=coverage.out | tee coverage.txt | |
| go tool cover -html=coverage.out -o coverage.html | |
| total="$(awk '/^total:/ {print $3}' coverage.txt)" | |
| { | |
| printf '## Go Coverage\n\n' | |
| printf -- '- Total statement coverage: `%s`\n' "$total" | |
| printf -- '- Coverage artifacts uploaded: `coverage.out`, `coverage.txt`, `coverage.html`\n' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload Go coverage artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: go-coverage | |
| path: | | |
| coverage.out | |
| coverage.txt | |
| coverage.html | |
| - name: Build Go CLI | |
| run: go build ./cmd/agentbox | |
| - name: Run Go version command | |
| run: go run ./cmd/agentbox version |