Skip to content

Commit

Permalink
ci: Split the install-tools into test/build groups (#4878)
Browse files Browse the repository at this point in the history
Resolves #4846 
Refactor CI installation process: split install-tools into
mockery/testing/build sub-targets, divide install-ci into
install-test-tools and install-build-tools

---------

Signed-off-by: MeenuyD <[email protected]>
  • Loading branch information
MeenuyD authored Oct 24, 2023
1 parent 0d259f3 commit 0e3be02
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-unit-tests-go-tip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
- name: Install tools
run: make install-ci
run: make install-test-tools

- name: Run unit tests
run: make test-ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
go-version: 1.21.x

- name: Install tools
run: make install-ci
run: make install-test-tools

- name: Run unit tests
run: make test-ci
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -500,15 +500,21 @@ changelog:
draft-release:
./scripts/draft-release.py

.PHONY: install-tools
install-tools:
$(GO) install github.com/vektra/mockery/[email protected]
.PHONY: install-test-tools
install-test-tools:
$(GO) install github.com/golangci/golangci-lint/cmd/[email protected]
$(GO) install mvdan.cc/gofumpt@latest

.PHONY: install-build-tools
install-build-tools:
$(GO) install github.com/josephspurrier/goversioninfo/cmd/[email protected]

.PHONY: install-tools
install-tools: install-test-tools install-build-tools
$(GO) install github.com/vektra/mockery/[email protected]

.PHONY: install-ci
install-ci: install-tools
install-ci: install-test-tools install-build-tools

.PHONY: test-ci
test-ci: GOTEST := $(GOTEST_QUIET)
Expand Down

0 comments on commit 0e3be02

Please sign in to comment.