Skip to content

Commit

Permalink
Added coverage report to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
RealA10N committed Jul 13, 2024
1 parent 834c284 commit ff9ac8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go
name: go

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
on: [push, pull_request]

jobs:
build:
Expand Down Expand Up @@ -35,3 +31,8 @@ jobs:

- name: Test
run: make test

- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MODULE_DIR := usm
TARGET := build/usm
COVERAGE_TARGET := coverage.out

.PHONY: build
build:
Expand All @@ -11,4 +12,4 @@ run: build

.PHONY: test
test:
go test $(MODULE_DIR)/...
go test -coverprofile=$(COVERAGE_TARGET) $(MODULE_DIR)/...

0 comments on commit ff9ac8b

Please sign in to comment.