From 14e1943c20075a5dc19ab7b32aae6ad7f08109a2 Mon Sep 17 00:00:00 2001 From: sashabaranov <677093+sashabaranov@users.noreply.github.com> Date: Wed, 8 Mar 2023 19:14:34 +0400 Subject: [PATCH] add code coverage github action (#134) --- .github/workflows/pr.yml | 7 +++++-- README.md | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4928a70..1051f1f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,6 +1,7 @@ name: PR sanity check -on: pull_request +on: + - push jobs: prcheck: @@ -20,4 +21,6 @@ jobs: with: version: latest - name: Run tests - run: go test -v . + run: go test -race -covermode=atomic -coverprofile=coverage.out -v . + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 diff --git a/README.md b/README.md index 2231a81..2ef00a0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Go OpenAI [![GoDoc](http://img.shields.io/badge/GoDoc-Reference-blue.svg)](https://godoc.org/github.com/sashabaranov/go-openai) [![Go Report Card](https://goreportcard.com/badge/github.com/sashabaranov/go-openai)](https://goreportcard.com/report/github.com/sashabaranov/go-openai) +[![codecov](https://codecov.io/gh/sashabaranov/go-openai/branch/master/graph/badge.svg?token=bCbIfHLIsW)](https://codecov.io/gh/sashabaranov/go-openai) > **Note**: the repository was recently renamed from `go-gpt3` to `go-openai`