Skip to content

Commit

Permalink
run tests and coverage better
Browse files Browse the repository at this point in the history
Signed-off-by: Arnav Gupta <[email protected]>
  • Loading branch information
championswimmer committed Nov 5, 2023
1 parent 610064b commit 99c8207
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: go get ./...

- name: Build
run: go build -v ./...
run: make build ARGS="-v"

test:
runs-on: ubuntu-latest
Expand All @@ -43,5 +43,10 @@ jobs:
run: go get ./...

- name: Test
run: go test -v ./...
run: go test -coverprofile=coverage.txt -race -covermode=atomic -v -coverpkg=./src/... ./tests/...

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ fabric.properties

# Output of the go coverage tool, specifically when used with LiteIDE
*.out
coverage.txt

# Dependency directories (remove the comment below to include it)
# vendor/
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ endif

build:
@echo "Building $(OS) $(ARCH) binary..."
@GOOS=$(OS) GOARCH=$(ARCH) go build -o "bin/$(BINARY_NAME)" src/main.go
@GOOS=$(OS) GOARCH=$(ARCH) go build $(ARGS) -o "bin/$(BINARY_NAME)" src/main.go

build_all:
@echo "Building linux amd64 binary..."
Expand Down

0 comments on commit 99c8207

Please sign in to comment.