Skip to content

Commit

Permalink
Extract a common makefile for multinode and chains. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-raykov authored Jan 30, 2025
1 parent f9ffc7e commit 466bfbb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@ jobs:
- name: Ensure "make generate" has been run
run: |
cd multinode && make rm-mocked && make generate
make rm-mocked && make generate
git add --all
git diff --stat --cached --exit-code
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
.PHONY: gomods
gomods: ## Install gomods
go install github.com/jmank88/[email protected].3
go install github.com/jmank88/[email protected].5

.PHONY: gomodtidy
gomodtidy: gomods
gomods tidy

.PHONY: lint-workspace lint
GOLANGCI_LINT_VERSION := 1.62.2
GOLANGCI_LINT_COMMON_OPTS := --max-issues-per-linter 0 --max-same-issues 0
GOLANGCI_LINT_DIRECTORY := ./golangci-lint
.PHONY: mockery
mockery: $(mockery) ## Install mockery.
go install github.com/vektra/mockery/[email protected]

lint-workspace:
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY)
.PHONY: generate
generate: mockery
find . -type f -name .mockery.yaml -execdir mockery \; ## Execute mockery for all .mockery.yaml files

lint:
@./script/lint.sh $(GOLANGCI_LINT_VERSION) "$(GOLANGCI_LINT_COMMON_OPTS)" $(GOLANGCI_LINT_DIRECTORY) "--new-from-rev=origin/main"
.PHONY: rm-mocked
rm-mocked:
grep -rl "^// Code generated by mockery" | grep .go$ | xargs -r rm
19 changes: 0 additions & 19 deletions multinode/Makefile

This file was deleted.

0 comments on commit 466bfbb

Please sign in to comment.