-
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.
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.