Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .github/workflows/go-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,12 @@ jobs:
run: go mod download

- name: Run tests
run: go test ./...
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...

- name: Upload coverage to Codecov
if: success() && matrix.go-version == '1.25'
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
fail_ci_if_error: true
9 changes: 0 additions & 9 deletions .github/workflows/publish-on-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,6 @@ jobs:
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: '1.27'
cache: true

- name: Run tests
run: go test ./...

- name: Determine next version
id: version
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions code_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ func TestNameRoundtrip(t *testing.T) {

// TestNameUnknown verifies Name() returns empty string for unknown codes.
func TestNameUnknown(t *testing.T) {
t.Parallel()

unknown := []string{"", "99999", "ZZZZZ", "00001"}
for _, code := range unknown {
if got := pgcode.Name(code); got != "" {
Expand Down