mirror of
https://github.com/soheilhy/cmux.git
synced 2026-10-19 16:16:14 +00:00
The library already compiled and passed tests, but tooling and dependencies were stale. This brings everything up to current standards without changing public behavior. Library (go 1.23.0): - cmux_test.go: fix 8 `go vet` failures by sending writer-goroutine errors to the existing errCh (now buffered) instead of t.Fatal; ioutil.ReadAll -> io.ReadAll - matchers.go: io/ioutil -> io (io.Discard); gofmt -s doc comment - go.mod: go 1.11 -> 1.23.0; golang.org/x/net -> v0.42.0 (newest release that still permits a 1.23 directive) Example submodule: - golang.org/x/net/context -> stdlib context - grpc v1.27.0 -> v1.80, modern protobuf; helloworld now comes from the separate google.golang.org/grpc/examples module (requires go 1.25, isolated to this demo-only module) CI: - remove ancient .travis.yml (Go 1.6-1.8) - add .github/workflows/ci.yml: gofmt/vet/build/test -race for the library (Go 1.23 + 1.24 matrix) and the example Temporary() methods and TLS version defaults are intentionally unchanged: net.Error still requires Temporary(), and the TLS defaults are public-API behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
51 lines
1.0 KiB
YAML
51 lines
1.0 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
library:
|
|
name: library (go ${{ matrix.go }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
go: ["1.23", "1.24"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: ${{ matrix.go }}
|
|
- name: gofmt
|
|
run: test -z "$(gofmt -s -l .)" || (gofmt -s -l . && exit 1)
|
|
- name: vet
|
|
run: go vet ./...
|
|
- name: build
|
|
run: go build ./...
|
|
- name: test
|
|
run: go test -race ./...
|
|
|
|
example:
|
|
name: example
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: example
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.25"
|
|
- name: gofmt
|
|
run: test -z "$(gofmt -s -l .)" || (gofmt -s -l . && exit 1)
|
|
- name: vet
|
|
run: go vet ./...
|
|
- name: build
|
|
run: go build ./...
|
|
- name: test
|
|
run: go test -race ./...
|