Skip to content

test: fix tests and increase coverage #21

test: fix tests and increase coverage

test: fix tests and increase coverage #21

Workflow file for this run

name: CI
"on":
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.21'
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v
- name: Test
run: go test -v
- name: Coverage report
run: |
go test -v -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Vet
run: go vet
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3