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

Pin mockery version in Makefile #1319

Merged
merged 2 commits into from
Jul 20, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ meta/
packages.txt
requirements.txt
sagemaker-batch-inference.py
testbin/
testbin/golangci-lint
vendor/github.com/theupdateframework/notary/Dockerfile
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ GIT_COMMIT_SHORT=$(shell git rev-parse --short HEAD)
VERSION ?= SNAPSHOT-${GIT_COMMIT_SHORT}

LDFLAGS_VERSION=-X github.com/astronomer/astro-cli/version.CurrVersion=${VERSION}
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin

CORE_OPENAPI_SPEC=../astro/apps/core/docs/public/public_v1alpha1.yaml

Expand All @@ -12,6 +11,22 @@ GOLANGCI_LINT_VERSION ?=v1.50.1

PWD=$(shell pwd)

## Location to install dependencies to
ENVTEST_ASSETS_DIR=$(shell pwd)/testbin
$(ENVTEST_ASSETS_DIR):
mkdir -p $(ENVTEST_ASSETS_DIR)

## Tool Binaries
MOCKERY ?= $(ENVTEST_ASSETS_DIR)/mockery

## Tool versions
MOCKERY_VERSION ?= v2.32.0

.PHONY: kustomize
mockery: $(ENVTEST_ASSETS_DIR)
(test -s $(MOCKERY) && $(MOCKERY) --version | grep -i $(MOCKERY_VERSION)) || GOBIN=$(ENVTEST_ASSETS_DIR) go install github.com/vektra/mockery/v2@$(MOCKERY_VERSION)


lint:
@test -f ${ENVTEST_ASSETS_DIR}/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${ENVTEST_ASSETS_DIR} ${GOLANGCI_LINT_VERSION}
${ENVTEST_ASSETS_DIR}/golangci-lint version
Expand All @@ -36,7 +51,7 @@ temp-astro:
temp-astro-flow:
./astro flow init $(shell mktemp -d)

mock: mock_airflow mock_houston mock_astro mock_pkg mock_astro_core mock_airflow_api
mock: mockery mock_airflow mock_houston mock_astro mock_pkg mock_astro_core mock_airflow_api

mock_houston:
mockery --filename=ClientInterface.go --output=houston/mocks --dir=houston --outpkg=houston_mocks --name ClientInterface
Expand Down
11 changes: 5 additions & 6 deletions airflow-client/mocks/Client.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/ContainerHandler.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/DockerCLIClient.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/DockerComposeAPI.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/DockerRegistryAPI.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/ImageHandler.go

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

11 changes: 5 additions & 6 deletions airflow/mocks/RegistryHandler.go

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

Loading