Skip to content

Commit

Permalink
make and ci fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Wilcsinszky <[email protected]>
  • Loading branch information
pepov committed Jul 26, 2023
1 parent 9d2e693 commit 08b974d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Init
run: make go.work

- name: Gather metadata
id: meta
uses: docker/metadata-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: actions/checkout@v3

- name: Build
run: go build -v ./...
run: make build

- name: Test
run: go test -v ./...
run: make test
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,20 @@ check: license-cache license-check
go.work:
go work init . ${CUSTOM_FORMATS}

.PHONY:
.PHONY: reinit
reinit:
rm -f go.work
@$(MAKE) go.work

.PHONY:
.PHONY: build
build: go.work
CGO_ENABLED=0 go build -a -o ${BIN}/loggen main.go

.PHONY:
.PHONY: test
test: go.work
go test ./...

.PHONY: docker-run
docker-run:
docker build . -t log-generator:local && docker run -p 11000:11000 log-generator:local

Expand Down

0 comments on commit 08b974d

Please sign in to comment.