mcp: add race and 1.25 tests, fix a bug in streamable transport #390
Workflow file for this run
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: | |
| # Manual trigger | |
| workflow_dispatch: | |
| push: | |
| branches: main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Check formatting | |
| run: | | |
| unformatted=$(gofmt -l .) | |
| if [ -n "$unformatted" ]; then | |
| echo "The following files are not properly formatted:" | |
| echo "$unformatted" | |
| exit 1 | |
| fi | |
| echo "All Go files are properly formatted" | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: [ '1.23', '1.24', '1.25.0-rc.2' ] | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Test | |
| run: go test -v ./... | |
| race-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Test with -race | |
| run: go test -v -race ./... |