Skip to content

Commit

Permalink
Bump to the go1.16 (#19)
Browse files Browse the repository at this point in the history
* Update to the go.1.16

* Make generate

* Reflect new travis links in README.md

* Move from Travis to the Github actions

* Update .github/workflows/ci.yaml

Co-authored-by: Klaus Post <[email protected]>

* Update .github/workflows/ci.yaml

Co-authored-by: Klaus Post <[email protected]>

* Update .github/workflows/ci.yaml

Co-authored-by: Klaus Post <[email protected]>

* Update .github/workflows/release.yaml

Co-authored-by: Klaus Post <[email protected]>

* Reflect GA build status in Readme.md

* Add go-releaser check

* Use golangci-lint

* Use older golangci-lint version

* Ignore golangci-lint failure

* Release on pushed tag

Co-authored-by: Klaus Post <[email protected]>
  • Loading branch information
TheSAS and klauspost committed Jan 25, 2022
1 parent b31f3ee commit 1a1ec38
Show file tree
Hide file tree
Showing 22 changed files with 1,403 additions and 130 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI
on:
push:
branches:
- master
pull_request:
branches: [ master ]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.16.x, 1.17.x]
runs-on: ${{ matrix.os }}
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
# TODO: fix golangci-lint errors and warnings, and remove continue-on-error
continue-on-error: true
uses: golangci/golangci-lint-action@v2
with:
version: v1.43
-
name: Tests
run: |
go mod tidy
go test -v ./...
go test -cpu=1 -short -race ./...
go test -cpu=4 -short -race ./...
go-releaser-check:
needs: build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x

- name: Checkout code
uses: actions/checkout@v2

- name: goreleaser deprecation
run: curl -sfL https://git.io/goreleaser | VERSION=v1.2.5 sh -s -- check

- name: goreleaser snapshot
run: curl -sL https://git.io/goreleaser | VERSION=v1.2.5 sh -s -- --snapshot --skip-publish --rm-dist
27 changes: 27 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: goreleaser

on:
push:
tags:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.16.x'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: v1.2.5
args: release --rm-dist
47 changes: 0 additions & 47 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ clean:
generate: install
go install github.com/tinylib/msgp
go install github.com/goadesign/goa/goagen
go install golang.org/x/tools/cmd/goimports
go generate ${PROJECT}
go generate ${PROJECT}/api
goimports -w .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RankDB

[![Build Status](https://travis-ci.com/Vivino/rankdb.svg?branch=master)](https://travis-ci.com/Vivino/rankdb)
![Build Status](https://github.com/Vivino/rankdb/actions/workflows/ci.yaml/badge.svg)


RankDB is a fast and scalable ranking system optimized for realtime ranking of various metrics.
Expand Down
2 changes: 1 addition & 1 deletion api/app/contexts.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/controllers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/hrefs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/media_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/security.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/backup_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/elements_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/health_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/jwt_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/lists_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/multilist_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/test/static_testing.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/app/user_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions api/rankdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,3 +365,7 @@ type lruWrapper struct {
func (l lruWrapper) Add(k, v interface{}) {
l.Cache.Add(k, v)
}

func (l lruWrapper) Remove(k interface{}) {
l.Cache.Remove(k)
}
32 changes: 12 additions & 20 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,37 @@ module github.com/Vivino/rankdb
require (
github.com/BurntSushi/toml v0.3.1
github.com/aerospike/aerospike-client-go v2.2.0+incompatible
github.com/armon/go-metrics v0.0.0-20170913184837-0a12dc6f6b9d // indirect
github.com/aws/aws-sdk-go v1.19.16
github.com/aws/aws-sdk-go v1.42.24
github.com/cenkalti/backoff v0.0.0-20170921171023-61ba96c4d100
github.com/dgraph-io/badger v1.6.0
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/dimfeld/httppath v0.0.0-20170720192232-ee938bf73598 // indirect
github.com/dimfeld/httptreemux v4.0.1+incompatible // indirect
github.com/goadesign/goa v1.4.1
github.com/gofrs/uuid v3.2.0+incompatible // indirect
github.com/google/go-cmp v0.3.0
github.com/google/go-cmp v0.5.6
github.com/google/gxui v0.0.0-20151028112939-f85e0a97b3a4 // indirect
github.com/hashicorp/go-immutable-radix v0.0.0-20170725221215-8aac27015308 // indirect
github.com/hashicorp/golang-lru v0.5.1
github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c // indirect
github.com/klauspost/compress v1.11.1
github.com/goreleaser/goreleaser v1.2.5
github.com/hashicorp/golang-lru v0.5.4
github.com/klauspost/compress v1.13.6
github.com/klauspost/readahead v1.3.1
github.com/klauspost/shutdown2 v1.1.0
github.com/kr/pretty v0.1.0 // indirect
github.com/manveru/faker v0.0.0-20160419072036-717f7cf83fb7 // indirect
github.com/manveru/gobdd v0.0.0-20131210092515-f1a17fdd710b // indirect
github.com/mattn/go-colorable v0.0.9
github.com/mattn/go-isatty v0.0.8 // indirect
github.com/mattn/go-colorable v0.1.12
github.com/newrelic/go-agent v1.5.0
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/pascaldekloe/goe v0.1.0 // indirect
github.com/philhofer/fwd v1.0.0 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
github.com/spf13/cobra v0.0.5
github.com/sirupsen/logrus v1.7.0
github.com/spf13/cobra v1.3.0
github.com/tinylib/msgp v1.1.0
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31 // indirect
github.com/ugorji/go/codec v1.1.7
github.com/yuin/gopher-lua v0.0.0-20160527050859-47f0f792b296 // indirect
github.com/zach-klippenstein/goregen v0.0.0-20160303162051-795b5e3961ea // indirect
go.etcd.io/bbolt v1.3.5
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/tools v0.1.4 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
golang.org/x/tools v0.1.8
)

go 1.15
go 1.16
Loading

0 comments on commit 1a1ec38

Please sign in to comment.