Skip to content

Commit

Permalink
test make format ci
Browse files Browse the repository at this point in the history
  • Loading branch information
agbpatro authored and sethterashima committed Dec 8, 2023
1 parent 72860f9 commit 4c4e5ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ jobs:
with:
go-version: 1.20.12

- name: No formatting changes
run: |
make format
git diff --exit-code
- name: Test
run: make test
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
all: build

format:
git describe --tags --abbrev=0 | sed 's/v//' > pkg/account/version.txt
set-version:
if TAG=$$(git describe --tags --abbrev=0); then echo "$${TAG}" | sed 's/v//' > pkg/account/version.txt; fi

format: set-version
go fmt ./...

test:
go test -cover ./...
go vet ./...

build: format test
build: set-version test
go build ./...

install: format test
install: test
go install ./cmd/...

.PHONY: install build test format
.PHONY: install build test format set-version

0 comments on commit 4c4e5ae

Please sign in to comment.