Skip to content

Commit

Permalink
feat: add ci step
Browse files Browse the repository at this point in the history
Signed-off-by: coderth <[email protected]>
  • Loading branch information
CoderTH committed Jan 24, 2024
1 parent a5f2b34 commit 77e13b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/golang-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,17 @@ jobs:
version: latest
args: -v --timeout 5m
skip-cache: true
test:
name: Unit test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- run: make test
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,6 +57,3 @@ jobs:

- name: Build
run: make docker-build

- name: Tests
run: make docker-coverage
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ golangci-lint:

COVERAGE_FILE := coverage.out
test: build cmds
go test -v -coverprofile=$(COVERAGE_FILE) $(MODULE)/...
go test -race -cover -v -coverprofile=$(COVERAGE_FILE) $(MODULE)/...

coverage: test
cat $(COVERAGE_FILE) | grep -v "_mock.go" > $(COVERAGE_FILE).no-mocks
Expand Down

0 comments on commit 77e13b0

Please sign in to comment.