Skip to content

Commit

Permalink
Merge branch 'master' into nicovak/fix-707
Browse files Browse the repository at this point in the history
  • Loading branch information
LandonTClipp authored Jan 12, 2024
2 parents d119c66 + 2502f52 commit b6625de
Show file tree
Hide file tree
Showing 86 changed files with 1,218 additions and 144 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ jobs:
git fetch origin gh-pages --depth=1
- name: Deploy docs
run: "mike deploy --push --update-aliases $(echo ${{ github.ref_name }} | cut -d'.' -f1-2 ) latest"
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
27 changes: 0 additions & 27 deletions .github/workflows/golangci-lint.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.21'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
os: [ macos-latest, ubuntu-latest]
go_vers: ['1.20']
go_vers: ['1.21']
steps:
- uses: actions/checkout@v2
with:
Expand Down
8 changes: 7 additions & 1 deletion .mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ with-expecter: True
mockname: "{{.InterfaceName}}"
filename: "{{.MockName}}.go"
outpkg: mocks

tags: "custom2"
packages:
github.com/vektra/mockery/v2/pkg/fixtures/buildtag/comment:
config:
mock-build-tags: "custom3 && (!windows || !darwin || !freebsd)"
disable-version-string: true
interfaces:
IfaceWithCustomBuildTagInComment:
github.com/vektra/mockery/v2/pkg:
interfaces:
TypesPackage:
Expand Down
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tasks:

test:
cmds:
- go test -v -coverprofile=coverage.txt ./...
- go run gotest.tools/gotestsum --format testname -- -v -coverprofile=coverage.txt ./...
desc: run unit tests
sources:
- "**/*.go"
Expand Down
4 changes: 3 additions & 1 deletion cmd/mockery.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ func NewRootCmd() *cobra.Command {
pFlags.Bool("version", false, "prints the installed version of mockery")
pFlags.Bool("quiet", false, `suppresses logger output (equivalent to --log-level="")`)
pFlags.Bool("keeptree", false, "keep the tree structure of the original interface files into a different repository. Must be used with XX")
pFlags.String("tags", "", "space-separated list of additional build tags to use")
pFlags.String("tags", "", "space-separated list of additional build tags to load packages")
pFlags.String("mock-build-tags", "", "set the build tags of the generated mocks. Read more about the format: https://pkg.go.dev/cmd/go#hdr-Build_constraints")
pFlags.String("filename", "", "name of generated file (only works with -name and no regex)")
pFlags.String("structname", "", "name of generated struct (only works with -name and no regex)")
pFlags.String("log-level", "info", "Level of logging")
Expand Down Expand Up @@ -376,6 +377,7 @@ func (r *RootApp) Run() error {
InPackage: r.Config.InPackage,
KeepTree: r.Config.KeepTree,
Note: r.Config.Note,
MockBuildTags: r.Config.MockBuildTags,
PackageName: r.Config.Outpkg,
PackageNamePrefix: r.Config.Packageprefix,
StructName: r.Config.StructName,
Expand Down
10 changes: 6 additions & 4 deletions cmd/showconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ func showConfig(
if err != nil {
return stackerr.NewStackErrf(err, "failed to unmarshal config")
}
log, err := logging.GetLogger(config.LogLevel)
if err != nil {
return fmt.Errorf("getting logger: %w", err)
}
ctx = log.WithContext(ctx)
if err := config.Initialize(ctx); err != nil {
return err
}
Expand All @@ -48,10 +53,7 @@ func showConfig(
if err != nil {
return stackerr.NewStackErrf(err, "failed to marshal yaml")
}
log, err := logging.GetLogger(config.LogLevel)
if err != nil {
panic(err)
}

log.Info().Msgf("Using config: %s", config.Config)

fmt.Fprintf(outputter, "%s", string(out))
Expand Down
11 changes: 11 additions & 0 deletions docs/assets/images/logos/mongodb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b6625de

Please sign in to comment.