Skip to content

Commit

Permalink
Merge pull request #60 from ojizero/gomod
Browse files Browse the repository at this point in the history
Moving Vice to gomod and general housecleaning
  • Loading branch information
Ameer A committed Jun 13, 2022
2 parents 660007f + 529f6b1 commit 19c177c
Show file tree
Hide file tree
Showing 12 changed files with 3,206 additions and 1,723 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: CI

on:
push:

jobs:
go-test:
strategy:
matrix:
go-version:
- 1.18.x
- 1.17.x
name: Go test
runs-on: ubuntu-latest
services:
redis:
image: "redis:7"
ports:
- "6379:6379"
rabbitmq:
image: "rabbitmq:3"
ports:
- "5672:5672"
nsq:
image: "nsqio/nsq:v1.0.0-compat"
ports:
- "4150:4150"
options: --entrypoint nsqd
nats:
image: "nats-streaming:0.5.0"
ports:
- "4222:4222"
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}

- name: Get source
uses: actions/checkout@v3

- name: Go test
run: go test -v -timeout 30s -race ./...

go-vet:
name: Go vet
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x

- name: Get source
uses: actions/checkout@v3

- name: Go vet
run: go vet ./...

golint:
name: Golint
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x

- name: Get source
uses: actions/checkout@v3

- name: Go get golint
run: go mod download

- name: Golint
run: go run golang.org/x/lint/golint -set_exit_status ./...

staticcheck:
name: Staticcheck
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.18.x

- name: Get source
uses: actions/checkout@v3

- name: Go get staticcheck
run: go mod download

- name: Golint
run: go run honnef.co/go/tools/cmd/staticcheck ./...
34 changes: 0 additions & 34 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions example/greeter/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
// Send a name: curl -d 'Mat' 'http://127.0.0.1:4151/pub?topic=names'

// Greeter is a service that greets people.
func Greeter(ctx context.Context, names <-chan []byte,
greetings chan<- []byte, errs <-chan error) {
func Greeter(ctx context.Context, names <-chan []byte, greetings chan<- []byte, errs <-chan error) {
for {
select {
case <-ctx.Done():
Expand Down
41 changes: 41 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module github.com/matryer/vice

go 1.17

require (
github.com/aws/aws-sdk-go v1.44.16
github.com/go-redis/redis v6.15.9+incompatible
github.com/gofrs/uuid v4.2.0+incompatible
github.com/matryer/is v1.4.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
github.com/nats-io/nats.go v1.15.0
github.com/nats-io/stan.go v0.10.2
github.com/nsqio/go-nsq v1.1.0
github.com/streadway/amqp v1.0.0
github.com/stretchr/testify v1.7.1
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616
honnef.co/go/tools v0.3.2
)

require (
github.com/BurntSushi/toml v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/nats-io/nats-server/v2 v2.8.2 // indirect
github.com/nats-io/nats-streaming-server v0.24.6 // indirect
github.com/nats-io/nkeys v0.3.0 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.19.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect
golang.org/x/tools v0.1.11-0.20220513221640-090b14e8501f // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
Loading

0 comments on commit 19c177c

Please sign in to comment.