Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1 21 #200

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ on:
jobs:
benchmark:
timeout-minutes: 10
strategy:
matrix:
go-version: [1.20.x]
runs-on: ubuntu-latest
env:
GO111MODULE: on
Expand All @@ -26,10 +23,10 @@ jobs:
ports: ["6379:6379"]
options: --health-cmd="redis-cli ping" --health-interval 1s --health-timeout 3s --health-retries 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Install system deps
run: |
sudo apt-get update
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
version: v1.55.2
args: --timeout 3m
4 changes: 2 additions & 2 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)'
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: go.mod
- name: Set VERSION (if any)
if: ${{ contains(github.ref, 'refs/tags/v') }}
id: version
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)'
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: go.mod
- name: Set VERSION (if any)
if: ${{ contains(github.ref, 'refs/tags/v') }}
id: version
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
CGO_ENABLED: "0"
GOFLAGS: "-mod=vendor"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
Expand All @@ -26,9 +26,9 @@ jobs:
- run: go mod vendor
- name: Build mruby
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)'
- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: go.mod
- name: Set VERSION (if any)
if: ${{ contains(github.ref, 'refs/tags/v') }}
id: version
Expand Down
37 changes: 17 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
jobs:
test:
if: "!contains(github.event.head_commit.message, '[ci skip tests]')"
strategy:
matrix:
go-version: [1.20.x]
runs-on: ubuntu-20.04
env:
GO111MODULE: on
Expand All @@ -24,7 +21,7 @@ jobs:
ports: ["6379:6379"]
options: --health-cmd="redis-cli ping" --health-interval 1s --health-timeout 3s --health-retries 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
Expand All @@ -38,9 +35,9 @@ jobs:
- run: go mod vendor
- name: Build mruby
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)'
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Run tests
run: make test
- name: Report coverage
Expand All @@ -50,31 +47,27 @@ jobs:
parallel: true
flag-name: ${{ matrix.go-version }}-ubuntu
- name: Build
if: matrix['go-version'] == '1.20.x'
run: |
make build
- name: Upload linux build
if: matrix['go-version'] == '1.20.x' && (github.ref == 'refs/head/master' || contains(github.event.pull_request.body, '[Build]'))
if: (github.ref == 'refs/head/master' || contains(github.event.pull_request.body, '[Build]'))
uses: actions/upload-artifact@v1
with:
name: anycable-go-Linux-x86_64
path: dist/anycable-go

test-macos:
if: "!contains(github.event.head_commit.message, '[ci skip tests]')"
strategy:
matrix:
go-version: [1.20.x]
runs-on: macos-11
runs-on: macos-latest
env:
GO111MODULE: on
GOFLAGS: "-mod=vendor"
COVERAGE: "true"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
go-version-file: go.mod
- name: Install system deps
run: |
brew install bison
Expand All @@ -84,6 +77,11 @@ jobs:
key: vendor-${{ hashFiles('**/go.sum') }}
restore-keys: |
vendor-
- uses: ruby/setup-ruby@v1
with:
# Use <3.0 since go-mruby's Rakefile has some problems with keyword arguments compatibility
ruby-version: 2.7
bundler-cache: true
- run: go mod vendor
- name: Build mruby
run: bash -c '(cd vendor/github.com/mitchellh/go-mruby && MRUBY_CONFIG=../../../../../../etc/build_config.rb make libmruby.a)'
Expand All @@ -96,11 +94,10 @@ jobs:
parallel: true
flag-name: ${{ matrix.go-version }}-macos
- name: Build
if: matrix['go-version'] == '1.20.x'
run: |
make build
- name: Upload MacOS build
if: matrix['go-version'] == '1.20.x' && (github.ref == 'refs/head/master' || contains(github.event.pull_request.body, '[Build]'))
if: (github.ref == 'refs/head/master' || contains(github.event.pull_request.body, '[Build]'))
uses: actions/upload-artifact@v1
with:
name: anycable-go-Darwin-x86_64
Expand Down Expand Up @@ -143,10 +140,10 @@ jobs:
image: nats:alpine
ports: ["4222:4222"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version-file: go.mod
- name: Install system deps
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ gen-ssl:

bin/golangci-lint:
@test -x $$(go env GOPATH)/bin/golangci-lint || \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.52.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.55.2

lint: bin/golangci-lint
$$(go env GOPATH)/bin/golangci-lint run
Expand Down
65 changes: 33 additions & 32 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,62 +1,63 @@
module github.com/anycable/anycable-go

go 1.20
go 1.21

require (
github.com/FZambia/sentinel v1.1.0
github.com/FZambia/sentinel v1.1.1
github.com/apex/log v1.9.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fullstorydev/grpchan v1.0.2-0.20210924023933-8d2633e44524
github.com/go-chi/chi/v5 v5.0.8
github.com/fullstorydev/grpchan v1.1.1
github.com/go-chi/chi/v5 v5.0.11
github.com/golang-collections/go-datastructures v0.0.0-20150211160725-59788d5eb259
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang/protobuf v1.5.2
github.com/gomodule/redigo v1.8.8
github.com/google/gops v0.3.27
github.com/gorilla/websocket v1.5.0
github.com/golang/protobuf v1.5.3
github.com/gomodule/redigo v1.8.9
github.com/google/gops v0.3.28
github.com/gorilla/websocket v1.5.1
github.com/hofstadter-io/cinful v1.0.0
github.com/joomcode/errorx v1.1.0
github.com/joomcode/errorx v1.1.1
github.com/matoous/go-nanoid v1.5.0
github.com/mattn/go-isatty v0.0.14
github.com/mattn/go-isatty v0.0.20
github.com/mitchellh/go-mruby v0.0.0-20200315023956-207cedc21542
github.com/namsral/flag v1.7.4-pre
github.com/nats-io/nats.go v1.31.0
github.com/pkg/errors v0.9.1 // indirect
github.com/posthog/posthog-go v0.0.0-20221221115252-24dfed35d71a
github.com/redis/rueidis v1.0.17
github.com/smira/go-statsd v1.3.2
github.com/posthog/posthog-go v0.0.0-20240110105835-f2ee529330e9
github.com/redis/rueidis v1.0.26
github.com/smira/go-statsd v1.3.3
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.11.1
github.com/urfave/cli/v2 v2.27.1
go.uber.org/automaxprocs v1.5.3
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df
golang.org/x/net v0.12.0
google.golang.org/grpc v1.53.0
golang.org/x/exp v0.0.0-20240110193028-0dcbfd608b1e
golang.org/x/net v0.20.0
google.golang.org/grpc v1.60.1
)

require github.com/sony/gobreaker v0.5.0

require (
github.com/klauspost/compress v1.17.2 // indirect
github.com/bufbuild/protocompile v0.7.1 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/minio/highwayhash v1.0.2 // indirect
github.com/nats-io/jwt/v2 v2.5.2 // indirect
github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect
golang.org/x/time v0.3.0 // indirect
github.com/nats-io/jwt/v2 v2.5.3 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240108191215-35c7eff3a6b1 // indirect
)

require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/jhump/protoreflect v1.5.0 // indirect
github.com/nats-io/nats-server/v2 v2.10.4
github.com/nats-io/nkeys v0.4.6 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/jhump/protoreflect v1.15.4 // indirect
github.com/nats-io/nats-server/v2 v2.10.7
github.com/nats-io/nkeys v0.4.7 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20230216225411-c8e22ba71e44 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/stretchr/objx v0.5.1 // indirect
github.com/xrash/smetrics v0.0.0-20231213231151-1d8dd44e695e // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading