Skip to content

Commit 66127ff

Browse files
authored
Migrate to mockery packages feature (#1124)
* Migrate to mockery packages feature * Fix workflow
1 parent 1b267eb commit 66127ff

File tree

43 files changed

+1900
-425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1900
-425
lines changed

.github/workflows/go.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,15 @@ jobs:
3434
with:
3535
go-version: 1.23.0
3636
- run: go test -v -race ./...
37+
38+
generate:
39+
runs-on: ubuntu-latest
40+
timeout-minutes: 10
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: actions/setup-go@v5
44+
with:
45+
go-version-file: tools/go.mod
46+
cache-dependency-path: tools/go.sum
47+
- run: make generate
48+
- uses: int128/update-generated-files-action@v2

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/.idea
22

3+
/tools/bin
4+
35
/acceptance_test/output/
46

57
/coverage.out

.mockery.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
outpkg: "{{.PackageName}}_mock"
2+
dir: "mocks/{{.PackagePath}}_mock"
3+
4+
packages:
5+
github.com/int128/kubelogin:
6+
config:
7+
all: true
8+
recursive: true

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.PHONY: all
2+
all:
3+
4+
.PHONY: generate
5+
generate:
6+
$(MAKE) -C tools
7+
rm -fr mocks/
8+
./tools/bin/mockery

0 commit comments

Comments
 (0)