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

Migrate over to uber-mainted fork of gomock #10

Merged
merged 2 commits into from
Oct 16, 2023
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .circleci/config.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "08:00"
reviewers:
- "Storytel/go"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
time: "08:00"
reviewers:
- "Storytel/go"
45 changes: 45 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI Pipeline

on:
pull_request:
push:
branches:
- master

permissions:
contents: read

jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

- name: Configure correct Go version
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: go.mod

# Check formatting early for a fast fail
- run: bash -c "diff -bu <(echo -n) <(gofmt -l ./)"

- run: go build .

- uses: dominikh/staticcheck-action@ba605356b4b29a60e87ab9404b712f3461e566dc # v1.3.0
with:
install-go: false

- run: go vet ./...

- name: Run Tests
run: |
go install gotest.tools/gotestsum@latest
gotestsum --jsonfile gotestsum-report.json -- -race ./...

- name: Annotate tests
if: always()
uses: guyarb/golang-test-annotations@a7869d394e8879bfc2e5dba4f1ea8bbb77a74f59 # v0.7.0
with:
test-results: gotestsum-report.json
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Gomock Matcher

[![CircleCI](https://circleci.com/gh/Storytel/gomock-matchers/tree/master.svg?style=svg)](https://circleci.com/gh/Storytel/gomock-matchers/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/Storytel/gomock-matchers/badge.svg)](https://coveralls.io/github/Storytel/gomock-matchers)
[![Go Report Card](https://goreportcard.com/badge/github.com/Storytel/gomock-matchers)](https://goreportcard.com/report/github.com/Storytel/gomock-matchers)

Matching library for use with [golang/gomock][golang-gomock]
Expand Down Expand Up @@ -129,5 +127,5 @@ func TestAsyncBlockMatcher(t *testing.T) {
```
</details>

[matcher-interface]: https://godoc.org/github.com/golang/mock/gomock#Matcher
[golang-gomock]: https://github.com/golang/mock
[matcher-interface]: https://godoc.org/go.uber.org/mock/gomock#Matcher
[golang-gomock]: https://github.com/uber-go/mock
2 changes: 1 addition & 1 deletion asyncblock.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package matchers

import "github.com/golang/mock/gomock"
import "go.uber.org/mock/gomock"

type AsyncBlockMatcher struct {
matcher gomock.Matcher
Expand Down
2 changes: 1 addition & 1 deletion asyncblock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

matchers "github.com/Storytel/gomock-matchers"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
)

func TestAsyncBlockMatcherPassthrough(t *testing.T) {
Expand Down
9 changes: 7 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
module github.com/Storytel/gomock-matchers

go 1.15
go 1.21

require (
github.com/golang/mock v1.2.1-0.20190311213431-837231f7bb37
github.com/stretchr/testify v1.3.0
google.golang.org/protobuf v1.31.0
)

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.uber.org/mock v0.3.0
)
11 changes: 2 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/golang/mock v1.2.1-0.20190311213431-837231f7bb37 h1:X/VEzS/ARNAir3sehGjZ/MT66dlHovEDk3Cr8BDm4oA=
github.com/golang/mock v1.2.1-0.20190311213431-837231f7bb37/go.mod h1:L3bP22mxdfCUHSUVMs+SPJMx55FrxQew7MSXT11Q86g=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
Expand All @@ -11,14 +8,10 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo=
go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8=
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
2 changes: 1 addition & 1 deletion proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package matchers
import (
"encoding/json"

"github.com/golang/mock/gomock"
"go.uber.org/mock/gomock"
"google.golang.org/protobuf/proto"
)

Expand Down
2 changes: 1 addition & 1 deletion recording.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package matchers

import "github.com/golang/mock/gomock"
import "go.uber.org/mock/gomock"

type RecordMatcher struct {
x interface{}
Expand Down
2 changes: 1 addition & 1 deletion recording_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

matchers "github.com/Storytel/gomock-matchers"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
)

func TestRecordMatcherPassthrough(t *testing.T) {
Expand Down