2023-01-16 22:58:25 +00:00
|
|
|
name: Collect Code Coverage
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-03-22 02:59:31 +00:00
|
|
|
uses: actions/checkout@v3
|
2023-01-16 22:58:25 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-03-19 00:55:51 +00:00
|
|
|
- name: Set up Go
|
2023-03-22 02:59:31 +00:00
|
|
|
uses: actions/setup-go@v4
|
2023-03-19 00:55:51 +00:00
|
|
|
with:
|
|
|
|
go-version: "1.20"
|
2023-01-16 22:58:25 +00:00
|
|
|
- name: Run coverage
|
|
|
|
run: go test -race -failfast -coverprofile=coverage.txt -covermode=atomic -v ./...
|
|
|
|
- name: Upload coverage to Codecov
|
2023-03-19 00:55:51 +00:00
|
|
|
uses: codecov/codecov-action@v3
|