Skip to content

Commit

Permalink
TECH Add code coverage tracking for better quality control
Browse files Browse the repository at this point in the history
  • Loading branch information
sibprogrammer committed Oct 6, 2023
1 parent e734a7d commit f606ac9
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
go-version: ^1.21

- name: Test
run: |
go mod download
make
run: make test

- name: Upload coverage 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 @@ -2,3 +2,4 @@
/plesk
/.plesk
/dist/
/coverage.txt
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ clean:
$(RM) $(OUTFILE)

test:
go test -v -cover ./...
go test -coverprofile=coverage.txt -covermode=atomic -v ./...

all: clean release build
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
coverage:
status:
project:
default:
target: 80%
threshold: 10%
patch:
default:
informational: true

0 comments on commit f606ac9

Please sign in to comment.