Skip to content

Commit

Permalink
Add go test command in Makefile and Github Actions
Browse files Browse the repository at this point in the history
Signed-off-by: Lam Tran <[email protected]>
  • Loading branch information
Lam Tran committed Dec 14, 2022
1 parent f26cd56 commit a8249d6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: ci

on:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v3
with:
go-version: ">=1.18"
cache: true
- run: make test
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
.PHONY: build
build:
go build -o ./bin/ ./cmd/devx
@go build -o ./bin/ ./cmd/devx

.PHONY: build
.PHONY: test
test:
@go test ./... --race --cover

0 comments on commit a8249d6

Please sign in to comment.