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

update build with go 1.14 #510

Merged
merged 2 commits into from
Oct 9, 2020
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 5 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
run:
deadline: 5m
modules-download-mode: vendor

issues:
exclude-rules:
- path: _test\.go
linters:
- unused
linters:
disable-all: true
enable:
Expand Down
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ go:
# happens with
# - 1.11.6
# - go 1.11.7
- 1.12.4
- 1.14.9

services:
- docker
Expand All @@ -24,7 +24,7 @@ before_install:

env:
global:
- GOLANGCI_LINT_VERSION=1.15.0
- GOLANGCI_LINT_VERSION=1.27.0
- GO111MODULE=on

matrix:
Expand Down
4 changes: 2 additions & 2 deletions .travis/golangci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build() {
local build_dir="$1"
pushd "$build_dir"
golangci-lint run --config ${golangci_config} -v
go test -v -race -mod=vendor ./...
go test -v -race -mod=mod ./...
popd
}

Expand Down Expand Up @@ -55,7 +55,7 @@ case "$build_part" in
exclude_pattern=${exclude_pattern:2}
exclude_pattern=$(printf 'github.com/KyberNetwork/reserve-stats/\(%s\)' "$exclude_pattern")
golangci-lint run --config ${golangci_config} --exclude "$exclude_pattern"
go test -v -race -mod=vendor $(go list -mod=vendor ./... | grep -v "$exclude_pattern")
go test -v -race -mod=mod $(go list -mod=mod ./... | grep -v "$exclude_pattern")

if [[ $TRAVIS_BRANCH == 'develop' ]]; then
build_docs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-binance-margin-trade-fetcher
RUN go build -v -mod=vendor -o /accounting-binance-margin-trade-fetcher
RUN go build -v -mod=mod -o /accounting-binance-margin-trade-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-binance-margin-trade-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-binance-trade-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-binance-trade-fetcher
RUN go build -v -mod=vendor -o /accounting-binance-trade-fetcher
RUN go build -v -mod=mod -o /accounting-binance-trade-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-binance-trade-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-binance-withdrawal-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-binance-withdrawal-fetcher
RUN go build -v -mod=vendor -o /accounting-binance-withdrawal-fetcher
RUN go build -v -mod=mod -o /accounting-binance-withdrawal-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-binance-withdrawal-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-cex-trades-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-cex-trades-api
RUN go build -v -mod=vendor -o /accounting-cex-trades-api
RUN go build -v -mod=mod -o /accounting-cex-trades-api

FROM debian:stretch
COPY --from=build-env /accounting-cex-trades-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-cex-withdrawals-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-cex-withdrawals-api
RUN go build -v -mod=vendor -o /accounting-cex-withdrawals-api
RUN go build -v -mod=mod -o /accounting-cex-withdrawals-api

FROM debian:stretch
COPY --from=build-env /accounting-cex-withdrawals-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-gateway
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-gateway
RUN go build -v -mod=vendor -o /accounting-gateway
RUN go build -v -mod=mod -o /accounting-gateway

FROM debian:stretch
COPY --from=build-env /accounting-gateway /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-huobi-trade-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-huobi-trade-fetcher
RUN go build -v -mod=vendor -o /accounting-huobi-trade-fetcher
RUN go build -v -mod=mod -o /accounting-huobi-trade-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-huobi-trade-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-huobi-withdrawal-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-huobi-withdrawal-fetcher
RUN go build -v -mod=vendor -o /accounting-huobi-withdrawal-fetcher
RUN go build -v -mod=mod -o /accounting-huobi-withdrawal-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-huobi-withdrawal-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-listed-token-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-listed-token-fetcher
RUN go build -v -mod=vendor -o /accounting-listed-token-fetcher
RUN go build -v -mod=mod -o /accounting-listed-token-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-listed-token-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-listed-tokens-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-listed-tokens-api
RUN go build -v -mod=vendor -o /accounting-listed-tokens-api
RUN go build -v -mod=mod -o /accounting-listed-tokens-api

FROM debian:stretch
COPY --from=build-env /accounting-listed-tokens-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-reserve-addresses-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-reserve-addresses-api
RUN go build -v -mod=vendor -o /accounting-reserve-addresses-api
RUN go build -v -mod=mod -o /accounting-reserve-addresses-api

FROM debian:stretch
COPY --from=build-env /accounting-reserve-addresses-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-reserve-rate-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-reserve-rate-fetcher
RUN go build -v -mod=vendor -o /accounting-reserve-rate-fetcher
RUN go build -v -mod=mod -o /accounting-reserve-rate-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-reserve-rate-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-reserve-rates-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-reserve-rates-api
RUN go build -v -mod=vendor -o /accounting-reserve-rates-api
RUN go build -v -mod=mod -o /accounting-reserve-rates-api

FROM debian:stretch
COPY --from=build-env /accounting-reserve-rates-api /
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-reserve-transaction-fetcher
RUN go build -v -mod=vendor -o /accounting-reserve-transaction-fetcher
RUN go build -v -mod=mod -o /accounting-reserve-transaction-fetcher

FROM debian:stretch
COPY --from=build-env /accounting-reserve-transaction-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-reserve-transactions-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-reserve-transactions-api
RUN go build -v -mod=vendor -o /accounting-reserve-transactions-api
RUN go build -v -mod=mod -o /accounting-reserve-transactions-api

FROM debian:stretch
COPY --from=build-env /accounting-reserve-transactions-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.accounting-wallet-erc20-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/accounting/cmd/accounting-wallet-erc20-api
RUN go build -v -mod=vendor -o /accounting-wallet-erc20-api
RUN go build -v -mod=mod -o /accounting-wallet-erc20-api

FROM debian:stretch
COPY --from=build-env /accounting-wallet-erc20-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.app-names-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/app-names/cmd/app-names-api
RUN go build -v -mod=vendor -o /app-names-api
RUN go build -v -mod=mod -o /app-names-api

FROM debian:stretch
COPY --from=build-env /app-names-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.burned-fees-crawler
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/burnedfees/cmd/burned-fees-crawler
RUN go build -v -mod=vendor -o /burned-fees-crawler
RUN go build -v -mod=mod -o /burned-fees-crawler

FROM debian:stretch
COPY --from=build-env /burned-fees-crawler /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.gateway
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/gateway/cmd
RUN go build -v -mod=vendor -o /gateway
RUN go build -v -mod=mod -o /gateway

FROM debian:stretch
COPY --from=build-env /gateway /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.price-analytics-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/priceanalytics/cmd/price-analytics-api
RUN go build -v -mod=vendor -o /price-analytics-api
RUN go build -v -mod=mod -o /price-analytics-api

FROM debian:stretch
COPY --from=build-env /price-analytics-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.reserve-rates-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/reserverates/cmd/reserve-rates-api
RUN go build -v -mod=vendor -o /reserve-rates-api
RUN go build -v -mod=mod -o /reserve-rates-api

FROM debian:stretch
COPY --from=build-env /reserve-rates-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.reserve-rates-crawler
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/reserverates/cmd/reserve-rates-crawler
RUN go build -v -mod=vendor -o /reserve-rates-crawler
RUN go build -v -mod=mod -o /reserve-rates-crawler

FROM debian:stretch
COPY --from=build-env /reserve-rates-crawler /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.token-rate-fetcher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/tokenratefetcher/cmd
RUN go build -v -mod=vendor -o /token-rate-fetcher
RUN go build -v -mod=mod -o /token-rate-fetcher

FROM debian:stretch
COPY --from=build-env /token-rate-fetcher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.trade-logs-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/tradelogs/cmd/trade-logs-api
RUN go build -v -mod=vendor -o /trade-logs-api
RUN go build -v -mod=mod -o /trade-logs-api

FROM debian:stretch
COPY --from=build-env /trade-logs-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.trade-logs-crawler
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/tradelogs/cmd/trade-logs-crawler
RUN go build -v -mod=vendor -o /trade-logs-crawler
RUN go build -v -mod=mod -o /trade-logs-crawler

FROM debian:stretch
COPY --from=build-env /trade-logs-crawler /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.trade-logs-post-processor
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/tradelogs/cmd/trade-logs-post-processor
RUN go build -v -mod=vendor -o /trade-logs-post-processor
RUN go build -v -mod=mod -o /trade-logs-post-processor

FROM debian:stretch
COPY --from=build-env /trade-logs-post-processor /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.users-api
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/users/cmd/users-api
RUN go build -v -mod=vendor -o /users-api
RUN go build -v -mod=mod -o /users-api

FROM debian:stretch
COPY --from=build-env /users-api /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.users-internal-cacher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/users/cmd/users-internal-cacher
RUN go build -v -mod=vendor -o /users-internal-cacher
RUN go build -v -mod=mod -o /users-internal-cacher

FROM debian:stretch
COPY --from=build-env /users-internal-cacher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.users-public-cacher
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/users/cmd/users-public-cacher
RUN go build -v -mod=vendor -o /users-public-cacher
RUN go build -v -mod=mod -o /users-public-cacher

FROM debian:stretch
COPY --from=build-env /users-public-cacher /
Expand Down
4 changes: 2 additions & 2 deletions docker-files/Dockerfile.users-public-stats
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.12-stretch AS build-env
FROM golang:1.14-stretch AS build-env

COPY . /reserve-stats
WORKDIR /reserve-stats/users/cmd/users-public-stats
RUN go build -v -mod=vendor -o /users-public-stats
RUN go build -v -mod=mod -o /users-public-stats

FROM debian:stretch
COPY --from=build-env /users-public-stats /
Expand Down
Loading