-
Notifications
You must be signed in to change notification settings - Fork 205
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
errordeveloper
wants to merge
5
commits into
docker:master
Choose a base branch
from
errordeveloper:ci
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+503
−118
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c1a57e7
Bump Go to 1.17.5 and start using modules
errordeveloper d01e9da
Add env var to override common timeouts in tests
errordeveloper 8e504cf
Remove Travis CI
errordeveloper 4ba2497
Configure basic GitHub Actions workflow
errordeveloper 45790e4
Rewrite `testWatch`
errordeveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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
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 | ||
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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.