Skip to content

Commit

Permalink
ci: add codecov action
Browse files Browse the repository at this point in the history
  • Loading branch information
shelepuginivan authored Aug 6, 2024
1 parent 778a643 commit 3b5c1f5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Codecov

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Get dependencies
run: go get -v -t -d ./...

- name: Coverage
run: go test -v -cover -race -coverprofile=coverage -covermode=atomic

- name: Upload coverage
if: github.event_name == 'push'
uses: codecov/codecov-action@v3
with:
file: ./coverage
verbose: true

0 comments on commit 3b5c1f5

Please sign in to comment.