add coverage tests

This commit is contained in:
diPhantxm
2023-03-14 03:15:26 +03:00
parent bca6626f07
commit 86916b568b
2 changed files with 21 additions and 3 deletions

View File

@@ -16,4 +16,24 @@ jobs:
uses: actions/checkout@v3
- name: Unit Tests
run: go test -v ./...
run: go test -v ./...
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Setup
run: |
go install github.com/mattn/goveralls@latest
- name: Test
run: |
go test -v ./... -parallel=10 -covermode=count -coverprofile=coverage.out
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
goveralls -coverprofile=coverage.out -service=github