Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
name: Go Test and Coveralls
on:
push:
branches:
- master
name: Quality
on: [push, pull_request]
jobs:
build:
test:
name: Test with Coverage
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v2
with:
go-version: ~1.20.2

- name: Install Coveralls
run: go get github.com/mattn/goveralls

- name: Run Tests and Upload Coverage
go-version: '1.20'
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
run: |
go test -v -coverprofile=profile.cov ./cmd/... ./internal/... ./pkg/...
go mod download
- name: Run Unit tests
run: |
go test -race -covermode atomic -coverprofile=covprofile ./cmd/... ./internal/... ./pkg/...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github