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

Upgrade Go, use modules and enable CI on GitHub Actions #220

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI
on:
pull_request:
types: [opened, reopened]
push:
branches: ["**"]
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-*"

jobs:
test:
name: Run tests
runs-on: ubuntu-20.04
services:
consul:
image: consul:1.9.13
ports: [ "8500:8500" ]
env:
CONSUL_LOCAL_CONFIG: '{"session_ttl_min": "1s"}'
CONSUL_BIND_INTERFACE: eth0
etcd:
# 3.3.x is the newevest version that works without code changes
image: quay.io/coreos/etcd:v3.3.27
ports: [ "4001:4001" ]
env:
ETCD_ADVERTISE_CLIENT_URLS: http://127.0.0.1:4001
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:4001
zookeeper:
image: zookeeper:3.7.0
ports: [ "2181:2181" ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.17.5'
- run: cd tools && go install github.com/GeertJohan/fgt github.com/mattn/goveralls golang.org/x/lint golang.org/x/tools/cmd/cover
- run: script/validate-gofmt
- run: go vet ./...
- run: go test -v -race ./...
env:
LIBKV_TEST_SHORT_TIMEOUT: 10s
- run: script/coverage
14 changes: 0 additions & 14 deletions .github/workflows/dummy.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

57 changes: 57 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
module github.com/docker/libkv

go 1.17

require (
github.com/coreos/etcd v3.3.25+incompatible
github.com/go-zookeeper/zk v1.0.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should decide not (yet) to use a go.mod here, as that would also mean that these dependencies will always be required (without a module, only dependencies for the packages that are actually used will be added in moby (I think?)

Copy link

@zhsj zhsj Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move on this PR?

With go1.17 and pruned module graphs, I think this is no longer a issue.

github.com/hashicorp/consul v0.5.2
github.com/stretchr/testify v1.7.0
go.etcd.io/bbolt v1.3.6
)

require (
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 // indirect
github.com/coreos/bbolt v1.3.3 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/go-msgpack v0.5.3 // indirect
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jonboulle/clockwork v0.2.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.uber.org/zap v1.19.1 // indirect
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 // indirect
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect
google.golang.org/grpc v1.40.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace google.golang.org/grpc => google.golang.org/grpc v1.23.0
Loading