From bf70c3db239c1daab152a121aa61c15d0dde810e Mon Sep 17 00:00:00 2001 From: b0r1ssh <295612221+b0r1ssh@users.noreply.github.com> Date: Tue, 8 Sep 2026 21:19:00 +0200 Subject: [PATCH] Add codecov file --- .codecov.yml | 14 ++++++++++++++ .github/workflows/go-test.yml | 2 +- README.md | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..3977715 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,14 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1% + patch: + default: + target: 90% + +comment: + layout: reach,diff,flags,files + behavior: default + require_changes: false diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 69ea3d5..3e8563f 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -35,7 +35,7 @@ jobs: run: go mod download - name: Run tests - run: go test -race -covermode=atomic -coverprofile=coverage.out ./... + run: go test -race -covermode=atomic -coverprofile=coverage.out -failfast ./... - name: Upload coverage to Codecov if: success() && matrix.go-version == '1.25' diff --git a/README.md b/README.md index 0c8bd2b..034c145 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![CI](https://github.com/b0r1ssh/pgcode/actions/workflows/go-test.yml/badge.svg)](https://github.com/b0r1ssh/pgcode/actions/workflows/go-test.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/b0r1ssh/pgcode.svg)](https://pkg.go.dev/github.com/b0r1ssh/pgcode) +[![codecov](https://codecov.io/github/b0r1ssh/pgcode/graph/badge.svg?token=U5FGJJQRVP)](https://codecov.io/github/b0r1ssh/pgcode) A small Go package exposing PostgreSQL SQLSTATE constants as typed string values.