Skip to content
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
4 changes: 3 additions & 1 deletion .github/workflows/golang_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ jobs:
with:
go-version: '^1.18'
- name: run unit testing
run: go test $(go list ./... | grep -v 'basic\|intermediate\|utilities')
run: make test
- name: unittesting dengan race-condition
run: make test-race
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
EXCLUDE_FOLDER = "basic\|intermediate\|utilities"
TEST_PACKAGE := $(shell go list ./... | grep -v $(EXCLUDE_FOLDER))

.DEFAULT_GOAL := test

test:
@echo "testing file golang"
go test -v $(TEST_PACKAGE)

test-race:
@echo "testing dengan race detector"
go test -race -v $(TEST_PACKAGE)

format:
@echo "format kode"
go fmt ./...

help:
@echo "command param tersedia"
@echo " make test - jalankan unittesting"
@echo " make test-race - jalankan testing dengan race detector"
@echo " format - format kode"